Skip to content

Commit

Permalink
Merge pull request #487 from jlacivita/dev
Browse files Browse the repository at this point in the history
Prevent OSMF plug-in from dropping live streams unexpectedly
  • Loading branch information
mangui committed Feb 11, 2016
2 parents 6017523 + 9a44a0c commit 3b9e481
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/org/mangui/osmf/plugins/traits/HLSTimeTrait.as
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mangui.osmf.plugins.traits {
import org.mangui.hls.HLS;
import org.mangui.hls.constant.HLSTypes;
import org.mangui.hls.event.HLSEvent;
import org.osmf.traits.TimeTrait;
import org.osmf.events.TimeEvent;

CONFIG::LOGGING {
import org.mangui.hls.utils.Log;
Expand Down Expand Up @@ -33,6 +35,15 @@
super.dispose();
}

override protected function signalComplete():void
{
// live streams shouldn't end based on TimeTrait
if (_hls.type !== HLSTypes.LIVE)
{
dispatchEvent(new TimeEvent(TimeEvent.COMPLETE));
}
}

/** Update playback position/duration **/
private function _mediaTimeHandler(event : HLSEvent) : void {
var newDuration : Number = event.mediatime.duration;
Expand Down

0 comments on commit 3b9e481

Please sign in to comment.