-
Notifications
You must be signed in to change notification settings - Fork 311
Conversation
Also, allow calling load without having the video play. Autoplay should autoplay the video as well.
@@ -119,7 +119,7 @@ package{ | |||
_app.model.autoplay = true; | |||
} | |||
|
|||
if(loaderInfo.parameters.preload != undefined && loaderInfo.parameters.preload == "true"){ | |||
if(loaderInfo.parameters.preload != "none"){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may want this to be if(loaderInfo.parameters.preload && loaderInfo.parameters.preload != 'none')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If preload isn't present, we want it to be true. So, I think that check should be ok. But let me double check that we don't get an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked it out and no error is thrown. If preload attribute isn't set on the video element, loaderInfo.parameters.preload
is set to undefined
, but no error is thrown and we preload the video.
see comment above, otherwise LGTM. |
Set preload to false if preload is set to 'none'
@@ -523,7 +528,9 @@ package com.videojs.providers{ | |||
break; | |||
|
|||
case "NetStream.Buffer.Full": | |||
_model.broadcastEventExternally(ExternalEventName.ON_BUFFER_FULL); | |||
if(!_loadeddataFired){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to make sure that ON_BUFFER_FULL fired if for some reason it didn't fire in onMetaData.
Addresses videojs/video.js#1523 |
Does the new ns pause cause any extra pause event? Steve Heffernan (mobile)
|
@heff good question. I'll double check. |
@heff no, there is no extra pause event. |
Don't bother firing ON_BUFFER_FULL in NetStream.Buffer.Full. Always fire it in onmetadata.
Unless pauseOnStart is set, we always want to resume the netstream.
Addresses #82. |
@@ -246,12 +248,13 @@ package com.videojs.providers{ | |||
} | |||
|
|||
public function init(pSrc:Object, pAutoplay:Boolean):void{ | |||
_onmetadadataFired = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on da meta da data da fired
Did some comparison of events emitted by the video element (or the flash tech) during playback. You can check out the raw data if you're interested. I will follow up with some observations in a bit. |
Flash behavior on different platforms is relatively consistent. Comparing HTML playback with the SWF after this change, the notable discrepancies I see are:
|
Even though there are still some discrepancies between Flash and HTML, I think this patch is a significant improvement. I'm going to file an issue for the observations above and pull this in. |
When we attempted to ensure that "loadeddata" would never fire before "loadedmetadata" in videojs#122, we also stopped updated video dimensions from propagating to the video view. Retain the boolean to ensure that load events only occur once per video but scope the conditional so that the other effects of new metadata are still run.
play
to add in the video url, we pause the ns.loadeddata
afterloadedmetadata
in onmetadata