-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
support src being an empty string #2852
Comments
This is currently how I test my error styles. Perhaps it would be a good idea to document how to put the player into an error state for error testing. |
You can trigger an error by calling |
Ah nice, I assumed there was some way to do it; I should have guessed it was that simple. |
So, after trying playing around with setting the |
Could we not just assume that an empty call to Also, I'd expect |
@Soviut |
Perhaps just document that |
Well, what I specifically want to happen with |
That sounds more like a reset. Perhaps a |
If facilities exist in the HTML spec to "reset the video element" than I think we should stick to those alone. Having two ways of doing the same thing can be confusing. |
Trying to read the spec to see if there's a "reset" functionality. Seems like it might be just removing all source elements, deleting the src attribute, and then calling |
I think |
Actually, I found the spec say exactly that: http://www.w3.org/TR/html5/embedded-content-0.html#best-practices-for-authors-using-media-elements
|
Well, questions about reset() aside, sounds like we should support nulling the src and calling load() |
As in ↓? player.src(null);
player.load(); Except it would cause an error to load because it will translate to video.src = null;
video.load(); Which does cause an error. Unless we want special handling for |
Ah, I overlooked the removal aspect. Tricky. |
We've decided to go with |
I have made a PR that adds the |
* upstream/stable: (479 commits) v5.4.4 @gkatsev switched to use custom vtt.js from npm. closes videojs#2905 v5.4.3 @gkatsev updated options customizer and github-release options. closes videojs#2903 v5.4.2 @gkatsev updated grunt-release config. closes videojs#2900 v5.4.1 @gkatsev added chg- and github- release for next releases. closes videojs#2899 v5.4.0 @gkatsev added ability to release next tag from master. closes videojs#2894 @gkatsev added nullcheck for cues in updateForTrack. Fixes videojs#2870. closes videojs#2896 @chemoish emulated HTMLTrackElement to enable track load events. closes videojs#2804 @gkatsev added a Player#reset method. Fixes videojs#2852. closes videojs#2880 @nick11703 changed multiline comments in sass with single-line comments. closes videojs#2827 @gkatsev added Player#tech. Fixes videojs#2617. closes videojs#2883 @misteroneill updated videojs-ie8 to 1.1.1. closes videojs#2869 v5.3.0 @imbcmdth added sourceOrder option for source-first ordering in selectSource. closes videojs#2847 @forbesjo updated formatTime to not go negative. closes videojs#2821 v5.2.4 ...
the spec basically says that when the src is set to an empty string, you want to reset the player and then stop and not try to loading anything. See step 9 of http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-algorithm
The text was updated successfully, but these errors were encountered: