Skip to content
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 from

Conversation

dmlap
Copy link
Member

@dmlap 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 2 commits February 9, 2015 11:30
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.
Expose a ready state method on the player object. Add tests to verify its presence.
@heff
Copy link
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
Copy link
Member Author

dmlap commented Feb 11, 2015

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

@heff
Copy link
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 net-ready-states branch February 12, 2015 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants