How to reloading Video in html5 - javascript

I making Streaming video with webRTC.
I want to reload video without stopping on HTML5.Src file is my filesystem.it's appending chunk while video playing.
Please tell me ‎(´・ω・`)

Did you try to add the loop parameter to your video tag?

Related

Custom scrub bar in video HTML5, set currentTime not working

I'm making a custom scrub bar in HTML video player. I'm creating a HTML5 video player and take a currentTime from video and it is working good, but seting currentTime after moving a scrub bar dose not working.
Firstly, I want write I've tried several possiblity to resolve this problem. I disable autoplay in video and other things, what can be.
But, one thing puzzles me. I can not have a directly URL to the video, I have a URL to JSP code on the server, and this code return to me this file. What can be a problem with it? Because, if I downloaded this movie file and set URL to directly to this movie file - with extension .mp4 - all starts working good.
Maybe it's problem with it I can not have a directly url to movie file?
I don't have any ideas to resolve this porblem. I'm counting on your help
if the video stored as an .mp4 or .ogg or .webm video file format, It would play. Here is how your html may look like.
<video controls preload="metadata">
<source src="http://www.example.com/waterfall-video.mp4" type="video/mp4"/>
<source src="http://www.example.com/waterfall-video.ogg" type="video/ogg">
Video not supported.
</video>

How can I hide video src attribute from browser's inspect element?

What I Have?
I have simple HTML code which play a video
<video src="">
<video controls src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
poster="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg"
width="540" height="360">
</video>
What I Want?
I want to hide src attribute of video tag when someone open inspector/inspect element of browser.
That is simply not possible.
If you want the browser to play the video, you have to tell him the url.
If you've send the url to the client, the user can grab it.
even if you obfuscate the url, and decode it in JS, as soon as my browser requests the video, I can grab the url in the network-logs of my dev-tools.
If you actually want to protect your files from being downloaded you should consider using a streaming service and not http delivery. With HLS or MPEG-DASH you can DRM your content with encryption keys.
Otherwise there is no way, think how Youtube and Vimeo can't stop people from downloading their files...

How to stop download video in HTML5 player

I have multiple HTML5 videos <video> on one page. When I play first, it starts downloading. But when I pause or stop it, download continues. When I play next video on the same page, there are two video downloads in the same time.
set the attribut preload="none" in the video tags or preload="metadata" if you want the length and other data upfront.
Question is similar as here. Try to use Media Source Extension.

Stop playing parent frame HTML5 audio from an iframe?

Quick question: I have an HTML document playing HTML5 Audio. Nothing fancy. Textbook really.
<audio id="audioclip" preload="auto" loop >
<source src="audio/music01.ogg" type="audio/ogg">
</audio>
The same HTML document features an iframe containing a few Images. Clicking on one of these images browses to a page containing an autostart HTML5 video clip.
Of course now the audio from the parent AND the audio from the iframe video play at the same time.
Is there an EASY way to stop the parent audio playback from inside the iframe automatically when the autoplay video triggers?
I found some pretty complicated stuff for parent/child communication. Far to sophisticated for me. But I also found this little snippet:
jQuery(function($) {
parent.$("#parent_element").trigger(event);
} (window.jQuery));
Could I put that to use in my case?
Or are there alternatives?
Just getting into JavaScript a little more, atm I'd consider myself a newbie. :-\
Many Thanks!
PS: On video end the iframe page automatically browses back to the previous page. It would be super-nifty if the audio would resume playing at the Point IF it was playing before. If not then...well...not. But I reckon that would be much more complex?

How do I display an image on an html 5 video element if and only if the video element is only outputting audio?

I have a video element that is either displaying both video and audio or just audio through a stream. I need to display a temporary image if it is only outputting audio. Does the "poster" attribute for a video element work? Or does that only display before the video has started playing?
Is there anyway to detect if a video element is only outputting audio?
Couple of suggestions:
Use getVideoTracks() to check if the stream has video.
Check the videoHeight of the video: if it's zero, there's no video.

Categories

Resources