Ash*_*ani 13 youtube ios youtube-iframe-api
我正在尝试使用youtube-ios-player-helper库播放YouTube视频,但我在运行时遇到错误:
Run Code Online (Sandbox Code Playgroud)Received error rendering template: Error Domain=NSCocoaErrorDomain Code=258 "The operation couldn't be completed. (Cocoa error 258.)"
Lov*_*and 40
在YTPlayerView.m中
编辑:
NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player"
ofType:@"html"
inDirectory:@"Assets"];
Run Code Online (Sandbox Code Playgroud)
至:
NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player"
ofType:@"html"];
Run Code Online (Sandbox Code Playgroud)
希望能帮到你!
您需要将 Assets/YTPlayerView-iframe-player.html复制到主包以解决此问题.
或者只是放入捆绑包,并替换App开始寻找的地方
/*NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player"
ofType:@"html"
inDirectory:@"Assets"];*/
NSString *path = [[NSBundle mainBundle] pathForResource:@"YTPlayerView-iframe-player" ofType:@"html"];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5897 次 |
| 最近记录: |