Angular Video stops playing after X minutes - html

I have an angular application with a html5 <video> which gets the video source from a url. The problem is that for apparently no reason, at some point the video stops playing and shows itself as loading and stays at that same point for a few minutes and then resumes playing. I haven't provided the code because it is just the video and a condition to check if the video time is inside the wanted fragments, as some parts should be skipped (When it is not the time jumps forward). The video is played inside a modal, and it is not a connection problem

Related

Getting player.on("ended") to work on more that 2 videos

I have been going around in circles with this so I have decided to ask for help.
I am trying to write a video based scenario that does the following.
video plays and at the end of the video a set of variables are changed and a new video is loaded.
I have set up the iframe and the first video plays fine. when the on ended event is triggered the actions are taken and the new video is loaded.
The problem arises when the second video as finished. The second video no longer triggers the on ended event.
Could anyone help me please?

Chromecast not playing multiple HTML5 videos

I have 2 video players on single page. On desktop, everything works fine, both video players are playing videos. But when I try to cast this page to Chromecast (via Google Chrome extension or via https://demille.github.io/url-cast-receiver/), only first video player is active and playing, second video player is not working.
I tried to debug it and it looks like second video ends at video readyState=1 (first video has readyState=4)
Is there way to fix this? (I need multiple video players on single page, so using only one player and switching video files URLs is not a solution)
URL: http://iuvomedia.eu/chromecast/
If you want one video to play and other to be pre-loaded then you should make a queue of videos you want to play. Chromecast will play single video at a time and when it ends it'll automatically load the next one in the queue.
For information on autoplay and queuing you may visit https://developers.google.com/cast/docs/autoplay
You cannot have more than one active media element.
I mean, you can have two media elements where one plays a video that doesn't have any audio and the second one plays only audio.
You cannot have two active video or two active audio pipelines at the same time.
check here: Create multiple instances of html video object

Why video is started from last end position?

I have a problem with youtube-api when i load a video. I am using loadVideoById function. I have tried also cueVideoById but the result is the same.
OK, here is what it is about.
when i play some video at YouTube page and will finish it in for example middle. YouTube will remember that position and next time i enter this video it will play from that position. Also im logged in in the Chrome browser. So when i load this video at my page using youtube api by function mentioned before it also starts this video from previously remembered position.
I tried to use stopVideo or seekTo(0) after loading it but it doesnt work. Also when i change the time of video and press stop and play next it will start again from remember position. Does anyone know the solution for this ?
JS fiddle:
https://jsfiddle.net/or2w8fpd/6/
Just open video by youtube side stop in the middle, check if youtube saved your position for future (if you return to video where does progress start) then open jsfiddle and try it. remember to be logged in to chrome browser

Flash AS3 erratic scrubber

Introduction
I made a video player that plays .mp4 files. It is based upon the FLVplaybackcomponent 2.5 in Flash Pro CS 5. It's basically a component with a movieclip interface (not a skin). the video plays fine, play/pause works and all that jazz.
Problem
The scrubber is erratic.
It seems to only be able to scrub in 10 second intervals and often behaves oddly (jumping to wrong locations).
All I seem to be doing is to take the total video time. Applying that time to a slider component so minimum is 0 and maximum is total video time. Then when the user changes the slider value it sets the playheadtime equal to the slider value.
If I trace out the values it seems fine, but the playheadtime is misbehaving.
If the slider displays 16 seconds and the playhead is made equal to 16 seconds it seems to snap at the closest 10 second interval.
Source
Here is a test file showcasing the problem:
http://rosefalk.dk/stuff/temp/stackoverflow/videoplayer_no_js.html
Here is the source with video and .fla: http://rosefalk.dk/stuff/temp/stackoverflow/stackoverflow-scrubberproblem.zip
BONUS
HTML players in some browsers seem to have no problem scrubbing the file.
The video service used (DigiZuite) seems to re-encode the video with keyframes every 10 seconds. Re-encoding the video with keyframes every second fixed the problem (small video so it was VERY noticeable).

Flash NetStream.Buffer.Flush firing repeatedly

I've made a custom video player in as3. Everything works, but once a video has loaded and played through completely, if the user replays the video it continuously fires the NetStream.Buffer.Flush event until the video stops playing again (by either ending or by the user hitting pause).
It doesn't seem to effect anything negatively, but I would rather not have an event continuously firing in the background like that.
I can't find any documentation of this happening online anywhere. Is this normal behavior for a NetStream that has fully loaded?
I believe I've fixed it, though I'm still not sure why it was repeatedly firing the flush event.
My custom videostream class was set to seek(0) once the video completed to rewind the current flv. It seems this was what was causing the issue. Instead of using seek(0), I just reset the source back to the original url, which reloads the video completely. Since the video is cached at that point, it reloads immediately so it's not an issue.