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

cocos2d-js VideoPlayer 无法播放url为https的网络视频(相同条件http正常播放) #20008

Open
ghost opened this issue Aug 2, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 2, 2019

  • cocos2d-x version: 3.17.2
  • devices test on: 小米8/iPhone 6s
  • developing environments
    • NDK version: r16b
    • Xcode version: 最新版
    • VS version: Na
    • browser type and version:Na

Steps to Reproduce:

  1. 在hello world场景中添加以下代码:
    var videoNode = new ccui.VideoPlayer();
    videoNode.setURL("https://benchmark.cocos2d-x.org/cocosvideo.mp4");
    videoNode.attr({
    x: size.width / 2,
    y: size.height / 2,
    width: size.width,
    height: size.height
    });
    this.addChild(videoNode);

2.查看android studio报错如下:
java.io.FileNotFoundException:
at android.content.res.AssetManager.nativeOpenAssetFd(Native Method)
at android.content.res.AssetManager.openFd(AssetManager.java:772)
at org.cocos2dx.lib.Cocos2dxVideoView.openVideo(Cocos2dxVideoView.java:310)
at org.cocos2dx.lib.Cocos2dxVideoView.access$1500(Cocos2dxVideoView.java:41)
at org.cocos2dx.lib.Cocos2dxVideoView$6.surfaceCreated(Cocos2dxVideoView.java:586)
at android.view.SurfaceView.updateSurface(SurfaceView.java:675)
at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:143)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2520)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1505)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7352)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1065)
at android.view.Choreographer.doCallbacks(Choreographer.java:877)
at android.view.Choreographer.doFrame(Choreographer.java:808)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1051)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
3.查看xcode错误:
没有明显报错信息(输出的信息和http一样)

@ghost ghost changed the title cocos2d-js VideoPlayer 无法播放url为https的网络视频(http正常播放) cocos2d-js VideoPlayer 无法播放url为https的网络视频(相同条件http正常播放) Aug 2, 2019
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

0 participants