I have a website where they want to add a video, but first we want the video to load and then the website is displayed.
I already have the video uploaded.
I just want the video to be shown first and then the web content
<center><video id="myVideo" src="http://as2.asset.aparat.com/aparat-video/325cc0361862066dc06e8fb1fc7ec8a77684093-240p__39060.mp4" autoplay style="border-radius:5px;width:100%;"></video></center>
I have the idea that JS can be used, to run when the document loads, but I don't know how to implement it
Related
This question is slightly different from:
https://stackoverflow.com/questions/15034835/can-i-hide-a-embeded-youtube-video-or-is-that-against-the-terms-of-use
When a user visits our website, the YouTube player is visible and in the right size. A user can play the video and see the whole video. Nothing fancy. However we want to put the player in a tabbed interface. Meaning that the user can hide the video by going to another tab. For example:
Video | Info | Share
When the site loads the Video tab is active, but users can click "Info", then the video is hidden while the video keeps playing in the background.
Is this allowed? I would say gray area but I'm not sure. We always show the YouTube logo and link to the YouTube video on youtube.com btw. Also, if a users scrolls down on youtube.com, the user also hides the video and can still hear the audio. Is this perhaps the same area?
This is in their terms of services so i would say it is not allowed
8.separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;
9.promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;
14.use a video player smaller than the minimum video player size set forth in the YouTube API documentation and specifications.
https://developers.google.com/youtube/terms?hl=it
I have a web site with a media player for audio built in. Currently when I visit another page in my website the media player resets for obvious reasons (because the entire page gets loaded).
Is there any way to keep the current song that is playing in the audio player, playing while the user clicks through to a new page? The audio player is simply inside a div and when the user wants to play a new song the javascript just changes the audio objects src atribute.
You should use an iframe and keep the audio player outside of it, so the user does not navigate the entire page but only in the iframe
Basic example:
<div id="audioplayer"></div>
<iframe src="index.html"></iframe>
I add videos to my site via the JavaScript YouTube API. It works well except that at the end of the video playback, there are several video choices that appear on my screen. I want to choose the video or videos that appear at the end of my video.
How can I do this?
I have developed a video playlist for a Drupal site. My question is: Is it possible to show the spinner instead of the big play button on every video ending(through Javascript), until the page containing the next video of each list is loaded? The videojs version that's used is 2.0.2.
I have a page that displays YouTube videos using the YouTube API. For each video I have a specific 30 second add video that I would like to play before the main video. Is there a way to do this through the YouTube API or plain javascript/jquery?
All you need to do is embed the ad first, then when it's done playing, hide it and show the main video.
First, detect when the ad is done playing with the Youtube API player.getPlayerState() function. This returns a zero when the video is ended.
Then, hide the embed with Javascript and show the main video.