iOS - Problem with YouTube api and fullscreen












1















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 full screen. I tested other parameters without any other result. On an other iOS 12.1 device or with older iOS-versions the video is displayed in fullscreen correctly.



self.playerView = [[YTPlayerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, f_frameHeight)];

self.playerView.delegate = self;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];

NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @1,
@"rel" : @0,
@"showinfo" : @0,
};
[self.playerView loadWithVideoId:ns_videoID playerVars:playerVars];

[self.view addSubview:self.playerView];


Has anyone the same problem or an idea what's could be the problem?










share|improve this question

























  • I'm actually running into the same issue. The playerVars don't work properly or something.

    – I make my mark
    Nov 13 '18 at 15:19











  • May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

    – Shamim Hossain
    Nov 14 '18 at 6:33











  • On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

    – Henning
    Nov 14 '18 at 6:59
















1















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 full screen. I tested other parameters without any other result. On an other iOS 12.1 device or with older iOS-versions the video is displayed in fullscreen correctly.



self.playerView = [[YTPlayerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, f_frameHeight)];

self.playerView.delegate = self;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];

NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @1,
@"rel" : @0,
@"showinfo" : @0,
};
[self.playerView loadWithVideoId:ns_videoID playerVars:playerVars];

[self.view addSubview:self.playerView];


Has anyone the same problem or an idea what's could be the problem?










share|improve this question

























  • I'm actually running into the same issue. The playerVars don't work properly or something.

    – I make my mark
    Nov 13 '18 at 15:19











  • May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

    – Shamim Hossain
    Nov 14 '18 at 6:33











  • On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

    – Henning
    Nov 14 '18 at 6:59














1












1








1








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 full screen. I tested other parameters without any other result. On an other iOS 12.1 device or with older iOS-versions the video is displayed in fullscreen correctly.



self.playerView = [[YTPlayerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, f_frameHeight)];

self.playerView.delegate = self;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];

NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @1,
@"rel" : @0,
@"showinfo" : @0,
};
[self.playerView loadWithVideoId:ns_videoID playerVars:playerVars];

[self.view addSubview:self.playerView];


Has anyone the same problem or an idea what's could be the problem?










share|improve this question
















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 full screen. I tested other parameters without any other result. On an other iOS 12.1 device or with older iOS-versions the video is displayed in fullscreen correctly.



self.playerView = [[YTPlayerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, f_frameHeight)];

self.playerView.delegate = self;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];

NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @1,
@"rel" : @0,
@"showinfo" : @0,
};
[self.playerView loadWithVideoId:ns_videoID playerVars:playerVars];

[self.view addSubview:self.playerView];


Has anyone the same problem or an idea what's could be the problem?







ios objective-c youtube-api ytplayerview






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 8:01









Shamim Hossain

836515




836515










asked Nov 13 '18 at 9:06









HenningHenning

85




85













  • I'm actually running into the same issue. The playerVars don't work properly or something.

    – I make my mark
    Nov 13 '18 at 15:19











  • May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

    – Shamim Hossain
    Nov 14 '18 at 6:33











  • On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

    – Henning
    Nov 14 '18 at 6:59



















  • I'm actually running into the same issue. The playerVars don't work properly or something.

    – I make my mark
    Nov 13 '18 at 15:19











  • May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

    – Shamim Hossain
    Nov 14 '18 at 6:33











  • On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

    – Henning
    Nov 14 '18 at 6:59

















I'm actually running into the same issue. The playerVars don't work properly or something.

– I make my mark
Nov 13 '18 at 15:19





I'm actually running into the same issue. The playerVars don't work properly or something.

– I make my mark
Nov 13 '18 at 15:19













May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

– Shamim Hossain
Nov 14 '18 at 6:33





May be problem with notch area in iPhone X. Please attach screenshot so that we can see the differences.

– Shamim Hossain
Nov 14 '18 at 6:33













On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

– Henning
Nov 14 '18 at 6:59





On an iPhone X it was ok. So it doesn't seem to be a general problem with the notch.

– Henning
Nov 14 '18 at 6:59












1 Answer
1






active

oldest

votes


















0














youtube is not supporting the "rel" nor "showinfo" parameters anymore, refer here : https://developers.google.com/youtube/player_parameters#rel , if you take out that parameters I think your code will work.






share|improve this answer
























  • I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

    – Henning
    Dec 10 '18 at 9:41











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277339%2fios-problem-with-youtube-api-and-fullscreen%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














youtube is not supporting the "rel" nor "showinfo" parameters anymore, refer here : https://developers.google.com/youtube/player_parameters#rel , if you take out that parameters I think your code will work.






share|improve this answer
























  • I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

    – Henning
    Dec 10 '18 at 9:41
















0














youtube is not supporting the "rel" nor "showinfo" parameters anymore, refer here : https://developers.google.com/youtube/player_parameters#rel , if you take out that parameters I think your code will work.






share|improve this answer
























  • I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

    – Henning
    Dec 10 '18 at 9:41














0












0








0







youtube is not supporting the "rel" nor "showinfo" parameters anymore, refer here : https://developers.google.com/youtube/player_parameters#rel , if you take out that parameters I think your code will work.






share|improve this answer













youtube is not supporting the "rel" nor "showinfo" parameters anymore, refer here : https://developers.google.com/youtube/player_parameters#rel , if you take out that parameters I think your code will work.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 7 '18 at 17:14









ShengingShenging

61




61













  • I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

    – Henning
    Dec 10 '18 at 9:41



















  • I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

    – Henning
    Dec 10 '18 at 9:41

















I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

– Henning
Dec 10 '18 at 9:41





I have removed both parameters. So I only have autoplay = 1 and playsinline = 0. Unfortunately, there is still no change to the automatic full screen. I get the full screen only when I press the corresponding button.

– Henning
Dec 10 '18 at 9:41


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277339%2fios-problem-with-youtube-api-and-fullscreen%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Full-time equivalent

Bicuculline

さくらももこ