How to get current live period from multi period dash stream - mpd

I 2 questions about Multi Period Dash how to get current live period from multi periods
For example :-
<Period duration="PT394.04S" id="2405" start="PT1673258997.04S">
<Period duration="PT15.0S" id="2405_1073741858_6" start="PT1673259457.56S">
<Period id="2405_1073741858_7" start="PT1673259472.56S">
is it (NOW(time) - Period start) < Period Duration) ? because some times its not working like that formula
Second question how get current segment number from timeline
For example :-
AUDIO:
<SegmentTemplate initialization="D-$RepresentationID$.dash" media="D-$RepresentationID$-$Time$.dash" presentationTimeOffset="80292708174720" timescale="48000">
<SegmentTimeline>
<S d="184320" r="31" t="80292721037311" />
<S d="178176" />
</SegmentTimeline>
</SegmentTemplate>
VIDEO:
<SegmentTemplate initialization="D-$RepresentationID$.dash" media="D-$RepresentationID$-$Time$.dash" presentationTimeOffset="1003658852184" timescale="600">
<SegmentTimeline>
<S d="2304" r="32" t="1003659011328" />
<S d="1560" />
</SegmentTimeline>
You can see r on video template is higher than audio so video segments are more than audio if we assume t value is start time always sounds out sync and i cant really match them so how to get right current video and audio number regardless segments index number

Related

Radzen Chart adjustment

I'm trying to graphically show balance/value of some bank account throughout time. For example, in the period of 2 years there were input/output transactions to/from bank account and they were not done periodically, let's say each day, there were few transactions in same day, then for few months nothing, then again few in the same day etc, so the graph looks messy.
And each of this dot on graph actually represents few transactions in that day and it's not really readable and looks silly, especially this long period of no changes. Is there any way to fix this up a little bit using Radzen or maybe some other tool?
Radzen code I used for shown graph:
<RadzenChart>
<RadzenLineSeries Smooth="false" Data="#HistoricalTransactionArray" CategoryProperty="Date" Title="Value" LineType="LineType.Solid" ValueProperty="Quote">
<RadzenMarkers MarkerType="MarkerType.Square" />
</RadzenLineSeries>
<RadzenCategoryAxis Padding="1" FormatString="{0:dd-MM-yyyy}" />
<RadzenValueAxis>
<RadzenGridLines Visible="true" />
<RadzenAxisTitle Text="Value" />
</RadzenValueAxis>
</RadzenChart>

Minimum number of characters before hx-get?

I'm wondering if it's possible to set a minimum number of characters before the request is dispatched in an input?
You can filter events in html using a filter expression, and use that to examine the number of characters in the input:
<input ... hx-trigger="keyup[target.value.length > 10]" ...>

Why this dash manifest keeps the player stuck until streams are downloaded?

I have this manifest file below . The issue is that the player waits for the streams to download completely before to start playing which is bad for the user experience. Any idea how to fix it? I expected the player to start range requests and feed media source with partial requests instead to wait for the streams to completely download.
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30M67.6S" minBufferTime="PT2S">
<ProgramInformation></ProgramInformation>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="0" mimeType="video/webm" codecs="vp9" bandwidth="770153" width="854" height="480" frameRate="23421/1000">
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/video.webm</BaseURL>
<SegmentList duration="1840613" startNumber="1">
<Initialization range="0-219"/>
<SegmentURL indexRange="220-6592"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="1" mimeType="audio/webm" codecs="opus" bandwidth="115412" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/audio.webm</BaseURL>
<SegmentList duration="1840641" startNumber="1">
<Initialization range="0-258"/>
<SegmentURL indexRange="259-3444"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
You seem to be using a mix of the DASH 'live' profile approach and the 'on-demand' profile one - you can see the profile in the profiles="urn:mpeg:dash:profile:isoff-live:2011" at the top of your manifest.
At a very high level the difference is:
'live' profile manifests contain a list of urls for each segment to be downloaded.
'on-demand' profile manifests contain a URL to a file and an index to where the segments can be found in the file, so the client can download chunks as it wants.
DASH is a complex specification and it may be that some players will accept some mixes of profiles and others not, and not all players support all features - for example Shaka player claims not to support 'indexRange' (or did in 2017: https://github.com/google/shaka-player/issues/765)

SCORM 2004 Rollup with single sco

I'm having issues rolling up a completion from a completed item.
I'm running this on SABA and I can successfully set the completion_status and success_status on the item but having issues rolling it up to the next level on the LMS, both satisfied and notSatisfied.
I find these rules utterly confusing. I do mostly work in SCORM 1.2.
This is my chunk to-date. Any assistance is really, really appreciated.
<organizations default="ORG-487461">
<organization identifier="ORG-487461">
<title>STATUS TESTING - 1d</title>
<item identifier="ACT-687940" identifierref="RES-123054">
<title>Launch</title>
<imsss:sequencing>
<imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true" />
</imsss:sequencing>
</item>
<imsss:sequencing>
<imsss:controlMode choice="true" flow="true"/>
<imsss:rollupRules>
<imsss:rollupRule childActivitySet="any">
<imsss:rollupConditions>
<imsss:rollupCondition condition="satisfied"/>
</imsss:rollupConditions>
<imsss:rollupAction action="satisfied"/>
</imsss:rollupRule>
<imsss:rollupRule childActivitySet="all">
<imsss:rollupConditions conditionCombination="any">
<imsss:rollupCondition operator="not" condition="satisfied" />
</imsss:rollupConditions>
<imsss:rollupAction action="notSatisfied" />
</imsss:rollupRule>
</imsss:rollupRules>
<imsss:rollupRules rollupObjectiveSatisfied="true" rollupProgressCompletion="true" />
</imsss:sequencing>
</organization>
</organizations>
I was deep in this a few years back but I'll try to assist based on some of my prior examples.
I think you need to set a primary objective. Else - I don't believe there is anything to roll up to. I don't however know that for a fact, as it would require going back and doing a deeper dive in to the SCORM 2004 3rd/4th edition spec and covering the IMSS Sequencing section.
Small example for an activity:
<!-- Activity 1 -->
<title>ims_sequencing_objectives</title>
<item identifier="ACT-001" identifierref="RES-001">
<title>SCOBot-QUnit1</title>
<imsss:sequencing IDRef="COMMON_SEQ_RULES">
<imsss:sequencingRules>
<!-- If you also wanted to limit the number of attempts -->
<imsss:preConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition="attemptLimitExceeded" />
</imsss:ruleConditions>
<!-- Can not choose -->
<imsss:ruleAction action="disabled" />
</imsss:preConditionRule>
</imsss:sequencingRules>
<imsss:limitConditions attemptLimit="1" /> <!-- attemptAbsoluteDurationLimit="" set if max_time_allowed -->
<imsss:rollupRules objectiveMeasureWeight="0" />
<imsss:objectives>
<!-- My Understanding is SCO1_SATISFIED will assume the scoring of the SCO, then you can continue to SCO 2 after the preCondition is met. This SCO is just a "intro" no score reported. Removed satisfiedByMeasure -->
<imsss:primaryObjective objectiveID="SCO1_SATISFIED">
<imsss:mapInfo targetObjectiveID="com.cybercussion.SCOBot.ACT-001" readSatisfiedStatus="true" writeSatisfiedStatus="true" readNormalizedMeasure="true" writeNormalizedMeasure="true" />
</imsss:primaryObjective>
</imsss:objectives>
</imsss:sequencing>
Then a subsequent activity would allow the LMS Player the opportunity to decide whether it should allow the navigation/show it using pre/post rules. And I would agree this gets confusing. Further more its even harder to unit test unless you have some rules engine that can parse this realtime to validate your intent. This below sample would be like Activity/SCO 3...
<imsss:preConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition referencedObjective="SCO2_SATISFIED" condition="satisfied" />
</imsss:ruleConditions>
<imsss:ruleAction action="disabled" />
</imsss:preConditionRule>
You can also control how the content controls the LMS. As some parts of SCORM like completion and success status could be based on progress_measure and scoring if completion thresholds are set (for example).
<!-- Sequence Collection used by SCOs -->
<imsss:sequencingCollection>
<imsss:sequencing ID="COMMON_SEQ_RULES">
<!-- Rollup: set to 0 if you don't want these scored. -->
<!--imsss:rollupRules objectiveMeasureWeight="1" /-->
<!-- prevent from accidentally being quto-completed/satisfied -->
<imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true" />
<!-- Attempt limit here had no effect -->
</imsss:sequencing>
</imsss:sequencingCollection>
I have a one page progression example here: https://github.com/cybercussion/SCOBot/wiki/Single-Pages-Managed-by-LMS-Navigation There may be something to glean off it. I always thought this was an area/gap the community would eventually fill with some builder/tool but since we are talking about 14 years almost now! I started to attempt to address some of this with my Packager app but there simply isn't enough customer request/demand to spend the time on it.
Good Luck.

is it possible to have dynamic tour from real time data kml

Is there a way to make a tour that is getting the coordinates from a script and updating the tour?
I am getting the data from a python script and then want to update the fly to coordiantes in the tour in real time but dont know how to do that
I tried using a network link but it wasnt working and im not sure if i use the animatedupdate or not
I haven't tried it, but it may be possible using a NetworkLinkControl in KML. You would need a total of four KML files to achieve it. In your scenario the first three could be hard coded, and the fourth could generate from your python script.
load-tour.kml - a NetworkLink file that loads tour.kml
tour.kml - a file that holds the original KML tour data
update-tour.kml - a NetworkLink file that loads the updated tour new-data.kml
new-data.kml - a NetworkLinkControl that updates the original tour.kml
Here are the four files, I have missed out the KML declaration and root element for brevity...
load-tour.kml
<NetworkLink>
<name>load</name>
<Link>
<href>tour.kml</href>
</Link>
</NetworkLink>
tour.kml
<Document>
<gx:Tour id="myTour">
<name>tour</name>
<gx:Playlist id="myPlaylist">
<!-- existing tour data goes here -->
</gx:Playlist>
</gx:Tour>
</Document>
update-tour.kml
<NetworkLink>
<name>update</name>
<Link>
<href>new-data.kml</href>
</Link>
</NetworkLink>
new-data.kml
<NetworkLinkControl>
<Update>
<targetHref>tour.kml</targetHref>
<Change>
<gx:Playlist id="myPlaylist">
<!-- new tour data goes here -->
</gx:Playlist>
</Change>
</Update>
</NetworkLinkControl>
Here is the documentation on the networklinkcontrol and its use in updating data.
https://developers.google.com/kml/documentation/kmlreference#networklinkcontrol
https://developers.google.com/kml/documentation/updates
You can have a NetworkLink update the camera position automatically by using flytoView. It's not an actual Tour but works similarly. Each time it loads the link, it flies to a new LookAt or Camera element in the linked KML.
root.kml
<NetworkLink>
<Link><href>new_camera.kml</href></Link>
...
<flyToView>1</flyToView>
</NetworkLink>
new_camera.kml
<Document>
<Camera>...
or
<LookAt>...
</Document>
I haven't had success updating a playing Tour from NetworkLink, other than changing the Tour name element. I tried starting a looping Tour and then changing the Playlist or FlyTo elements from NetworkLinkControl, but I only see the camera change if I manually restart the Tour.