Controlling the YouTube player - youtube-api

Is it possible to control somehow remotely the YouTube player using the API? I mean, for example, sending a message to forward the video by 10 seconds, or switch to the next video.

https://developers.google.com/youtube/iframe_api_reference
You can switch to the next video with loadVideoById/Url, cueVideoById/Url (for YouTube Embedded Player).
But IFrame Player API does not have the messaging mechanism. You should implement original code in JavaScript (Note the following).
https://developers.google.com/youtube/terms/required-minimum-functionality#overlays-and-frames
You must not display overlays, frames, or other visual elements in front of any part of a YouTube embedded player, including player controls.

Related

Youtube Iframe Player API Developer Policy Inquiries

I would like to ask about developer policies of Youtube Iframe Player API(https://developers.google.com/youtube/iframe_api_reference).
Our team is currently developing an iOS app including Youtube embedded player.
We would like to check if our use cases below violate the rules for embedded youtube player.
Would it be okay if we use invisible player which we set opacity zero for purpose of getting thumbnail images in video?
Thumnails are taken by invisible player in the way as seeking to specific time and capture view at the time.
The thumnails are solely used for progress bar which consist of sequential images as green box in the below image and each image indicates each parts of video and there is no other purposes.
Images are made and used only in client local environment and not saved in our database.
Additionaly, can we provide the thumbnail extracted in the above method which background is removed?
Would it be possible that we hide below title bar which shows when player paused by adjusting CSS style, view frame size ?
Is there the other way to hide title bar ?
it seems that there are other mobile app services in Korea also using embeded player without titlebar like ‘Cake’ ( https://apps.apple.com/kr/app/cake-케이크-영어회화/id1350420987 )
We are developing feature ‘Metronome’ using BPM(beat per minute). for this, we need to use Audio PCM data in Video. regarding this we are currently examining three cases.
is it allowed to extract audio file from video to get PCM data?
is it allowed to access to device’s audio buffer to get PCM data?
is it allowed to record audio with mobile device to make audio file ?
Is it possible to provide a Metronome function that repeatedly plays a specific sound simultaneously with the audio of the Youtube video?
Would it be okay if we invert embeded player left and right? we plan to provide a mirror mode for user so that they practice dance conveniently.
Is it possible to provide a function that play repeatedly the specific time range (ex. from 00:05 to 00:10)?
Is it possible to provide a function that does not play immediately when the play button is pressed, but counts down for a certain period of time, such as 3 seconds, to play?

Can I prevent users from interacting with the YouTube player in mobile app?

I want to ask about YouTube Required Minimum Functionality. Our development team wants to integrate YouTube player in mobile application, using iframe and react-native-webview. 
Terms of services says that "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." We are not planning to hide or obscure any part of player.
But can we prevent users from interacting with the YouTube player? For example, we want to prevent video sharing by wrapping the YouTube player in a component with touch actions disabled. But the user will still have the ability to control the video (stop, play, fast forward).

Can I use Youtube IFrame Player API as audio player?

I am using Youtube IFrame Player API on my own web project.
I am trying to use it as an audio player, so I hide iframe, and add a button which call playVideo() function.
I am wondering if it is legally okay to hide everything (iframe, logo, controller, everything) and use it as audio player.
Is there any legal problem for commercial use?

How do I change the YouTube player on my web site

How do I change the YouTube player on my web site. Like http://vidsshare.com/
Use the IFrame API for the embed video. The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
Using the API's JavaScript functions, you can queue videos for playback; play, pause, or stop those videos; adjust the player volume; or retrieve information about the video being played. You can also add event listeners that will execute in response to certain player events, such as a player state change or a video playback quality change
Just check the link above to know more about it.
For more information, check this YouTube Player Demo. This demo demonstrates the YouTube Player API's functions. Embedded players must have a viewport that is at least 200px by 200px. If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size.

Play Youtube Url In Webview without userControl in iOS

I want to play youtube url in UIWebview or MPMoviewviewcontroller.but the restriction is user should not control the playing video.could any one help ?
If you want finer control over youtube videos, theres a library (not written by me) called XCDYoutubeKit. Search for that and look at incorporating it into your app - theres a class in there that is based on MPMoviePlayerController, that allows the playing of youtube videos from their youtube id (I use it, its good). This also means you get a normal player, so you can pause, scrub through, etc.

Resources