how to build a new player similar to youtube functionality? - youtube

I would like to build a new player with following requirements like:
Call to action : Something like showing suggestion videos at the end of the video. (Like youtube)
Playlist : Player should have playlist (Like Youtube)
Playback speed : Playback speed should be adjusted as like in VLC media player
Closed Captioning : Something like closed captions which comes at the play time of a video in youtube
Should play from various service providers CDN
Will youtube's documentation on https://developers.google.com/youtube help us in any way with this requirement?

There are lots of open source and/or free players that already do this, so there would be no reason to build your own; have a look at Flowplayer, JW Player, videoJS, and others that a Google search pull up. If you're insistent on building your own, the YouTube documentation may give you some ideas as to what to look for in your own player, but the function calls will be different as you'll have to use the javascript media APIs (for HTML5 video).

Related

Embedding Youtube Videos: Customized Player and YT Terms of Service

I have a question about embedding a Youtube player on a website. Maybe you guys can help me with this.
Specifically, it's a question that can be well understood by the following website template:
http://themehelite.com/themeforest/panorama/index.html#Movie
Specifically, the library query.mb.YTPlayer is used there to embed Youtube videos "in the background". In the foreground (bottom left) "own controls" were included (play and stop button, etc.) The "normal" controls of Youtube itself are not visible.
However, in the YouTube API Services Terms of Service I have now found the following:
"You must not display overlays, frames, or other visual elements in
front of any part of a YouTube embedded player, including player
controls. Similarly, you must not use overlays, frames or other visual
elements to obscure any part of an embedded player, including player
controls."
Source: https://developers.google.com/youtube/terms/required-minimum-functionality#overlays-and-frames
Sounds to me like the implementation of the player in the example above violates the YouTube's Terms of Service and you couldn't implement it that way.
What is your opinion on this? Am I interpreting something wrong? Ultimately, it would mean that you can not use customized players at all?
Thanks for your help.

How to kill an embedded youtube video that is playing

Is there anyway to shut down a YouTube video that you've embedded on your page? It seems like they play to the end, no matter what. What I'd like is some way to use JavaScript to send a STOP signal to the YouTube player to completely disengage from the video and show whatever was there before the video was started. An END signal from the video player would also be nice, that called my JavaScript when the video finished.
By the way, I notice when I right-click the playing video that one option is "About the HTML5 Player" so apparently YouTube is using the HTML5 player. That might make the task of communicating with the player with JavaScript a bit easier.
Thanks for any ideas.
Yes, there is a way. Use what official documentation says: player.stopVideo(). If you have a problem with it, see Stop a youtube video with jquery? and How can I stop a video with Javascript in Youtube? as they not only contain solutions to common problems but discuss alternative ways of achieving the same goal.

Play a video from a url in default player in Native SDK for BlackBerry 10

I am developing an application for playing video from a url in bb10 cascades.I know it's very simple to play in media player.Please help me to play a video in default player.
I strongly recommend that you review the documentation provided on the BB10 Native micro-site that you will find here:
http://developer.blackberry.com/native/
I know there is a lot to look at, but it does seem to me to be quite logically presented. I just looked round and fairly quickly found this:
http://developer.blackberry.com/native/documentation/cascades/graphics_multimedia/audio_video/playing_audio_or_video.html
which seems to answer your question. Alternatively, you want want to just invoke the native player, in which case you need to look here:
http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/invocation_framework.html

Does youtube API or the allow music filters and repeat?

I would like to write a DJ's jukebox as a software which streams videos either from YouTube or from existing MP3s, and, I need to design the following:
playlists
repeat the same track
hopefully do some mixing as well
based on treble, bass and other frequencies of music coming from
different channels
...amongst others
Does YouTube allow this? Can I code this kind of music mixer? How?
YouTube has no official API for this.
You could download videos from YouTube (e.g. with yt-download), and separate the audio (e.g. ffmpeg-i video.flv audio.mp3); and use filters, like those provided by sox.
Also, in many places downloading most music from YouTube is a violation of copyright law. Distributing this application could get you in a lot of trouble, because you're encouraging people to break copyright law. (to my understanding).

PHP get screenshot from YouTube video

I have a website that has a variety of embedded YouTube videos. When a user pauses a given video I want a screenshot to be taken of the playing video. Now, I've taken many approaches in tackling this problem such as copying the video frame to canvas (this doesn't work because the videos are external to my site), and also through the use of FFMpeg, and FFMpeg-PHP. The latter two- although very powerful- also do not work as the given piece of media has to be hosted on my server.
I'm at my wits end about what to do as I've spent countless hours trying to do this, and I'm ready to accept defeat.
Any ideas?
Regards,
Andre.
There's no supported method in the YouTube Player or Data API to take a screenshot of an arbitrary frame of a video.
I used the img.youtube.com/vi path to get the image. The function getScreen basically parses the youtube url and grabs the &v= argument to get the video id.
Since I use youtube.com/embed/ url format, then I had to rework the function a little to get the video id.
http://mistonline.in/wp/get-youtube-video-screenshot-using-simple-php-and-javascript/#

Resources