Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(iOS) XCDYouTubeVideoErrorDomain: -2 with empty User Info for upcoming live stream #541

Open
Kiu212 opened this issue Jul 16, 2021 · 2 comments

Comments

@Kiu212
Copy link

Kiu212 commented Jul 16, 2021

Hello everyone, I used XCDYouTubeKit for my project and encounter a problem for upcoming live stream video in Youtube.
XCDYouTubeKit used to return the remaining time before live stream. However, it is not working now.

Here is the result in Xcode.
[XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. (XCDYouTubeVideoErrorDomain error -2.)
Domain: XCDYouTubeVideoErrorDomain
Code: -2
User Info: {
}

May I know there is anyone encounter the same problem?
Is there any idea to fix this issue? Thanks.

@Kiu212
Copy link
Author

Kiu212 commented Jul 19, 2021

I followed 2 modifications from another closed issue to fix the live broadcast cannot be played problem. #538

  1. XCDYouTubeVideoOperation.m
    self.eventLabels = [[NSMutableArray alloc] initWithArray:@[ @"embedded", @"detailpage" ]];
    --->> [Edit]
    self.eventLabels =[[NSMutableArray alloc] init];
  2. XCDYouTubeVideo.m
    NSString *httpLiveStream = info[@"hlsvp"] ?: XCDHTTPLiveStreamingStringWithString(playerResponse);
    --->> [Edit]
    NSString *httpLiveStream = info[@"hlsvp"] ?: XCDHTTPLiveStreamingStringWithString(playerResponse);
    if(httpLiveStream.length == 0){
    httpLiveStream = info[@"streamingData"][@"hlsManifestUrl"];
    }

It seems like the first modification makes the user info become empty.
After I use the old code in XCDYouTubeVideoOperation.m, it is working very well.

@kosswong
Copy link

The method you provided is worked, thank you bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants