So I have a website like YouTube and I want to monetize it. It uses simple HTML5 video player to display dynamic videos. I don't want to integrate any other player because my site is designed for HTML5 players. I have watched couple of videos about this, and neither of the source codes worked (It didn't display the ad itself). I use Adsterra VAST tag, so I don't know if it's their problem or not. I would be very happy if someone can help me with documentations or sample codes. Thank you!
So you would need to use IMA SDK for html5 player:
https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side
In there you can find the necessary code to do it, sorry for the late reply i just found this ticket.
Related
I'm trying to learn how to make a video gallery with html5. I'm looking for tutorials and information to this but I only find information to make video galleries based on videos that are on youtube or vimeo or gender sites. But what I wanted is to create a video gallery with videos that I have stored on my computer disk. Does anyone know how can I do this? What is the js plugin or something that i can use to learn how to do this?
I'm not sure but these might help you;
http://easyhtml5video.com/
http://www.microsoft.com/web/post/adding-video-to-your-website-using-the-new-html5-video-tag
Try this:
It works just fine with videos stored localy: http://html5box.com/html5gallery/
Question:
How can I control the sound output of this embedded video without overly complicating things?
Possible Solution (Complex)
I've looked into the youtube javascript control API, and, correct me if I'm wrong, but that will force me to incorporate a lot of complication into the setup to accomplish what appears to be a very simple task.
Note:
This is all only tested for webkit at this stage
Setup:
I've created an element that simulates an iphone controlling the channel of a tv by swapping youtube videos like so:
var channel1 = "http://www.youtube.com/embed/dFU6Cy4Hd5A?autoplay=1&rel=0&controls=0&showinfo=0&disablekb=1&iv_load_policy=3&modestbranding=1";
$("#channel-1").click(function(){
$("#tv").attr("src", channel1);
});
where the #channel-1 id is connected to a specific button on the remote, and the tv id is connected to the video player.
It looks like this:
Edit:
If the API is the only to accomplish this, please include a link to a comprehensive tutorial teaching the youtube web API, because I've looked, and found nothing. The only thing I've found so far is the official API page, and that's like trying to learn PHP from the manual.
For loading videos you would use loadVideoById rather than the rather odd snippet you have in your question and to play without audio you simply mute the player using player.mute() (where player is a reference retrieved from the youtube player element itself like described here). And one last thing, don't forget to add enablejsapi=1 to the url of the player as described here.
I would use
event.target.mute();
I have a single page web app that shows real time data using just HTML/CSS/JS - I have managed to keep Flash out of it.
Now I want to play a small chime but I don't want to make the site dependent on Flash. It is just a chime to indicate a new chat, so it is not a huge stumbling block but I would like to find a way.
Is this possible - I am guessing no since you need something local to play the sound, but I am hoping here!
Thanks in advance for any help!
Edit: I am not able to use HTML5 quite yet.
Check out the HTML5 audio framework buzz or MediaElement.JS
Playing .wav files embedded in html? Try Different ways to play sound from a website - UCL
Example two of this web page shows a good example. An easier version of this example would be this...
function playSound(soundfile) {
document.getElementById("sound_element").innerHTML=
"<embed src='"+soundfile+"' hidden=true autostart=true loop=false/>";
}
The HTML would be this...
<span id="sound_element"></span>
This puts a hidden embedded file in the web page. You can call this function by doing playSound(Path/To/File)
I am using this javascript code to get a downloadable video URL from the mobile youtube website.
[webView stringByEvaluatingJavaScriptFromString:#"function getURL() {var player = document.getElementById('player'); var video = player.getElementsByTagName('video')[0]; return video.getAttribute('src');} getURL();"];
Output URL: http://o-o.preferred.seabone-mil1.v22.nonxt2.c.youtube.com/videoplayback?el=results&begin=0&yms=5682703339584930992&itag=18&ip=87.0.0.0&app=youtube_mobile&signature=B8CD6B60D2609F5F137B885806F8FAECAA88492F.333D3F19876A77CECB264059A3852BD021401296&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Csource%2Cratebypass%2Ccp&len=254000&ratebypass=yes&source=youtube&expire=1323579819&sver=3&key=yt1&ipbits=8&cp=U0hRSFVSV19GU0NOMV9NTEFJOmV5Qk5wc3hWaUxG&id=b8e73777013e0b7e&ps=blazer
I would like to do the same with just the audio of the video. But i haven't succeeded yet. Can anyone help me?
I solved it! I use the youtube-mp3.org api which works really good. there are some questions about it on SO with good answers!
It's going to be difficult to extract the audio only portions from an existing video from within iOS. I'm sure there are libs out there that can help, but I think it's going to be an involved topic.
Perhaps you can take a look at Display YouTube Videos Without Exiting Your Application. It describes ways to play youtube videos from within your iOS application. Now if you do something similar but set the view to be hidden, you would be able to "listen" to the youtube videos's audio without showing the video itself on the screen.
I don't know what the end-goal is for you're application, but perhaps my suggestion will be food-for-thought.
I want to have a youtube player that changes videos when the links on the right are clicked. I know this is pretty basic but I've been tearing my hair out for 3 days now. I found an example using pictures an have been trying to modify it but no luck. Please help!
video gallery
I would stick to jQuery and try this:
http://smple.com/videoGallery/
Of course there are plenty alternatives available. Please see:
http://www.jquery.wisdomplug.com/jquery-plugins/multimedia-jquery-plugins/best-jquery-video-plugins/