Questions tagged [ytplayerview]

YTPlayerView is YouTube's official iOS Player Helper class which facilitates the playback of YouTube videos in iOS applications.

YTPlayerView (also known as youtube-ios-player-helper) is YouTube's official iOS Player Helper class which facilitates the playback of YouTube videos in iOS applications. Using a YTPlayerView is the only way to integrate a consumer application with YouTube without breaking their Terms of Service.

Use this tag only for questions about integrating with or using the YTPlayerView class on devices.

If you have a general question about YouTube or the YouTube API, use one of the related tags:

92 questions
2
votes
2 answers

YouTube iframe is too slow in iOS app

I am using YouTube API in my iOS application and the problem is that it loads really slow on my iPhone, but on iOS simulator it works perfectly. I tried it on different networks and on different iPhones and its always the same. On every network…
Nikola Klipa
  • 333
  • 3
  • 14
2
votes
1 answer

How to handle Done button in YTPlayer in iOS

I am playing Youtube videos in YTPlayerView. Video playing well (Opening in AVFullScreenViewController). But, after click on 'DONE' button the video auto opening full screen(video time length is there.). How to handle that tap on 'DONE' button to…
Goutham
  • 21
  • 5
2
votes
1 answer

Change Playback Quality of YTPlayerView

I am having a problem with quality for embedded YouTube videos in my app. I am using YTPlayerView to embed videos from YouTube. My app has 2 options: option 1 is the user can watch video with 360p quality and option 2 is 720p quality. Are these two…
Duyklinsi
  • 49
  • 1
  • 6
2
votes
2 answers

YouTube Live API Stream Status and Quality Callback

In the "Live Control Room" of a YouTube Live broadcast, I can see a "Stream Status" view which shows me details of the video being sent to YouTube's RTMP endpoint. I hit the liveStreams endpoint to get the "status" of the stream, but that only…
JAL
  • 41,701
  • 23
  • 172
  • 300
2
votes
1 answer

YTPlayerView thumbnail custom size

I am using YTPlayerView library from Google. I want to get the customised size thumbnail of a youtube video for my iOS app. Can anybody help me how I can achieve this? Current it is giving me the same size thumbnail for a video regardless of the…
Madu
  • 4,849
  • 9
  • 44
  • 78
2
votes
1 answer

Terminated due to Memory Pressure when using iOS AVPlayer

In my iOS application, I am running a YouTube video as a loop with the help of iOS YouTube helper library. But I am not giving the opportunity to play the video at it's full length but after 20 seconds I am queued the same video again like below. -…
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
1
vote
0 answers

Swift. Incorrect slider value in player (YTPlayerView) with YouTube-Player-iOS-Helper. Slider can't get to the end

Incorrect slider value in player (YTPlayerView) with YouTube-Player-iOS-Helper. Slider can't get to the end. Video is over, but my custom slider stop and don't get end its value. Where I'm wrong? I'll put some cut of code and functions (if need…
1
vote
2 answers

iOS: how to instantiate YTPlayerView programmatically?

I'm trying to instantiate the YTPlayerView from the youtube_ios_player_helper pod programmatically, with the following code: let player = YTPlayerView() player.cueVideo(byId: "someId", startSeconds: 0) then the needed constraints are created and…
R. Campos
  • 947
  • 1
  • 10
  • 26
1
vote
1 answer

iOS - Problem with YouTube api and fullscreen

In my app, I'm using the YTPlayerView to show a youtube video. I have set the parameters of the player so that the video is displayed in fullscreen. Now I have a new test device (iPhone XR with iOS 12.1) where the video is usually not displayed in…
Henning
  • 421
  • 2
  • 11
  • 22
1
vote
0 answers

how to set activity indicator to web view(yt player view) and stop when loading is complete?

@IBOutlet weak var ytplayer: YTPlayerView! var actInd = UIActivityIndicatorView() override func viewDidLoad() { super.viewDidLoad() actInd.center = self.ytplayer.center actInd.activityIndicatorViewStyle = .gray …
vishnu
  • 213
  • 1
  • 13
1
vote
0 answers

YTPlayerView adding a grey bar automatically. cant get rid of it

Here is the screen where the grey area is shown between navigation bar and video player . I read this one as well. Grey bar appearing under Navigation bar after segues Swift But didn't understood the solution as it didn't worked for me. Need help…
Rasel Khan
  • 21
  • 4
1
vote
2 answers

There is no audio when video is played while ringer is silent on iPhone. using YouTube-Player-iOS-Helper

I have used pod youtube-iso-player-helper to integrate YTPlayer within my native iOS application. The issue, I am facing, is I am not able to hear any sound while the video is being played when the iPhone that has ringer silent & it works fine with…
Siddharth Sunil
  • 233
  • 2
  • 10
1
vote
0 answers

iOS Get the instance of the current Picture-in-Picture player

I have a custom controller which contains a YTPlayerView and is showed to the navigation stack when user clicks on a video. It was all good, until there was Picture-in-Picture on iPads. I figured that when the user makes the player to play PiP,…
Nicholas
  • 747
  • 7
  • 23
1
vote
0 answers

Create a local playlist based on array of IDs for YTPlayerView YTPlayer

currently we're using on YTPlayerView: open func load(withVideoId videoId: String) -> Bool to load single videos. However in some cases we have a series of videos which need to play one after the other. Is it possible to create and load an array of…
Gaurav Sharma
  • 2,680
  • 3
  • 26
  • 36
1
vote
1 answer

iOS YTPlayer blank screen on pause

Currently I am making an iOS app which involves playing YouTube videos. I chose to use the official YouTube iOS Player Helper, which provides a mechanism to play YouTube videos with an URL. Since the appearance which came with it did not fit the…
Nicholas
  • 747
  • 7
  • 23