YTPlayerView does not play Content on Simulator (Decoding failed with error code)
up vote
0
down vote
favorite
When I play a normal content, it loads perfectly fine on
the simulator.
YTPlayerView parameters
@implementation SingleVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *videoId = @"weRHyjj34ZE";
// For a full list of player parameters, see the documentation for the HTML5 player
// at: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receivedPlaybackStartedNotification:)
name:@"Playback started"
object:nil];
}
But, If I have a HD Video in my playlist it gives below error and the code https://github.com/youtube/youtube-ios-player-helper
Code is available with the Git Project, just download it and change the videoId in the SingleVideoViewController.
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 6668
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code 7
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 480x360 [FFFFFFFF,FFFFFFFF] 0001C060
ios objective-c youtube-api ios-simulator
add a comment |
up vote
0
down vote
favorite
When I play a normal content, it loads perfectly fine on
the simulator.
YTPlayerView parameters
@implementation SingleVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *videoId = @"weRHyjj34ZE";
// For a full list of player parameters, see the documentation for the HTML5 player
// at: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receivedPlaybackStartedNotification:)
name:@"Playback started"
object:nil];
}
But, If I have a HD Video in my playlist it gives below error and the code https://github.com/youtube/youtube-ios-player-helper
Code is available with the Git Project, just download it and change the videoId in the SingleVideoViewController.
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 6668
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code 7
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 480x360 [FFFFFFFF,FFFFFFFF] 0001C060
ios objective-c youtube-api ios-simulator
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When I play a normal content, it loads perfectly fine on
the simulator.
YTPlayerView parameters
@implementation SingleVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *videoId = @"weRHyjj34ZE";
// For a full list of player parameters, see the documentation for the HTML5 player
// at: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receivedPlaybackStartedNotification:)
name:@"Playback started"
object:nil];
}
But, If I have a HD Video in my playlist it gives below error and the code https://github.com/youtube/youtube-ios-player-helper
Code is available with the Git Project, just download it and change the videoId in the SingleVideoViewController.
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 6668
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code 7
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 480x360 [FFFFFFFF,FFFFFFFF] 0001C060
ios objective-c youtube-api ios-simulator
When I play a normal content, it loads perfectly fine on
the simulator.
YTPlayerView parameters
@implementation SingleVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *videoId = @"weRHyjj34ZE";
// For a full list of player parameters, see the documentation for the HTML5 player
// at: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receivedPlaybackStartedNotification:)
name:@"Playback started"
object:nil];
}
But, If I have a HD Video in my playlist it gives below error and the code https://github.com/youtube/youtube-ios-player-helper
Code is available with the Git Project, just download it and change the videoId in the SingleVideoViewController.
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 6668
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code 7
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 480x360 [FFFFFFFF,FFFFFFFF] 0001C060
ios objective-c youtube-api ios-simulator
ios objective-c youtube-api ios-simulator
edited Nov 22 at 23:25
asked Nov 22 at 16:21
andyPaul
1,65052864
1,65052864
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15
add a comment |
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Try adding origin
parameter to your playerVars
dictionary
, i.e
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1,
@"origin":@"https://www.youtube.com"
};
From YouTube
API docs,
Origin: This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds. If you are using
the IFrame API, which means you are setting the enablejsapi parameter
value to 1, you should always specify your domain as the origin
parameter value.
You can read more about it here.
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try adding origin
parameter to your playerVars
dictionary
, i.e
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1,
@"origin":@"https://www.youtube.com"
};
From YouTube
API docs,
Origin: This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds. If you are using
the IFrame API, which means you are setting the enablejsapi parameter
value to 1, you should always specify your domain as the origin
parameter value.
You can read more about it here.
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
add a comment |
up vote
0
down vote
accepted
Try adding origin
parameter to your playerVars
dictionary
, i.e
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1,
@"origin":@"https://www.youtube.com"
};
From YouTube
API docs,
Origin: This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds. If you are using
the IFrame API, which means you are setting the enablejsapi parameter
value to 1, you should always specify your domain as the origin
parameter value.
You can read more about it here.
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try adding origin
parameter to your playerVars
dictionary
, i.e
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1,
@"origin":@"https://www.youtube.com"
};
From YouTube
API docs,
Origin: This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds. If you are using
the IFrame API, which means you are setting the enablejsapi parameter
value to 1, you should always specify your domain as the origin
parameter value.
You can read more about it here.
Try adding origin
parameter to your playerVars
dictionary
, i.e
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1,
@"origin":@"https://www.youtube.com"
};
From YouTube
API docs,
Origin: This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds. If you are using
the IFrame API, which means you are setting the enablejsapi parameter
value to 1, you should always specify your domain as the origin
parameter value.
You can read more about it here.
answered Nov 22 at 17:12
PGDev
6,32721144
6,32721144
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
add a comment |
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
Adding Origin worked. For some videos, it requires Origin.I think it is required for few videos, whether its HD or not. Any idea which setting for Video upload asks for it?
– andyPaul
Nov 22 at 23:23
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
What setting are you looking for while uploading the video?
– PGDev
Nov 23 at 12:16
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434938%2fytplayerview-does-not-play-content-on-simulator-decoding-failed-with-error-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
What is the url that you are playing? It might be corrupt.
– PGDev
Nov 22 at 16:38
I have a play list which I am trying to play. One video I have uploaded which works fine, other one I added from the YOU TUBE Video id weRHyjj34ZE
– andyPaul
Nov 22 at 16:46
Show the code that you have used to configure the player.
– PGDev
Nov 22 at 16:47
I have not written a new code, project example is available on GitHub , in SingleViewController just change the video id.
– andyPaul
Nov 22 at 16:58
Added the answer. You can have a look.
– PGDev
Nov 22 at 17:15