New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add network and ready state properties #1854

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@dmlap
Member

dmlap commented Feb 9, 2015

The network and ready state properties of the video element expose important information about playback and buffering that cannot be obtained otherwise. For the HTML5 tech, the player can simply pass through the respective properties. The Flash tech has some level of support for both states, though it's probably simplistic. Even if the Flash implementation isn't perfect, having access to the properties without having to dig through the player internals is worth it.

dmlap added some commits Feb 9, 2015

Add networkState method
Expose the network state property on the Flash and HTML techs. Stub the method out for the mediafaker. Verify the method is exported with minification.
Add readyState method
Expose a ready state method on the player object. Add tests to verify its presence.
@heff

This comment has been minimized.

Show comment
Hide comment
@heff

heff Feb 10, 2015

Member

lgtm! Do we want to add anything on the Flash side to handle readyState? I think it will error otherwise.

We could potentially build a shim into MediaTechController that listens for the element events and adjusts an internal readyState, so we don't necessarily have to built it into the swf. e.g. the loadedmetadata event would switch the tech ready state to have_metadata.

Member

heff commented Feb 10, 2015

lgtm! Do we want to add anything on the Flash side to handle readyState? I think it will error otherwise.

We could potentially build a shim into MediaTechController that listens for the element events and adjusts an internal readyState, so we don't necessarily have to built it into the swf. e.g. the loadedmetadata event would switch the tech ready state to have_metadata.

@dmlap

This comment has been minimized.

Show comment
Hide comment
@dmlap

dmlap Feb 11, 2015

Member

@heff believe it or not, readyState is already defined on the SWF. I was surprised, too.

Member

dmlap commented Feb 11, 2015

@heff believe it or not, readyState is already defined on the SWF. I was surprised, too.

@heff

This comment has been minimized.

Show comment
Hide comment
@heff

heff Feb 11, 2015

Member

wuuuuuuttt??? Wow, that's great.

On Wed, Feb 11, 2015 at 8:20 AM, David LaPalomento <notifications@github.com

wrote:

@heff https://github.com/heff believe it or not, readyState is already
defined
https://github.com/videojs/video-js-swf/blob/master/src/VideoJS.as#L258
on the SWF. I was surprised, too.


Reply to this email directly or view it on GitHub
#1854 (comment).

Member

heff commented Feb 11, 2015

wuuuuuuttt??? Wow, that's great.

On Wed, Feb 11, 2015 at 8:20 AM, David LaPalomento <notifications@github.com

wrote:

@heff https://github.com/heff believe it or not, readyState is already
defined
https://github.com/videojs/video-js-swf/blob/master/src/VideoJS.as#L258
on the SWF. I was surprised, too.


Reply to this email directly or view it on GitHub
#1854 (comment).

@dmlap dmlap closed this in 5e371b4 Feb 12, 2015

@dmlap dmlap deleted the dmlap:net-ready-states branch Feb 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment