WELCOME ! ~> @WORTHATRY.CN Visit My Blog!

Navigation

    StoneAge

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Cocos Creator 如何在 VideoPlayer 上面放置 UI 控件

    Blogs
    cocos
    4
    12
    2582
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Darzen last edited by

      你打开creator看看视频所在场景下Camera 组件上的 backgroundColor 的R、G、B、A有没有全部设为 0 。

      1 Reply Last reply Reply Quote 0
      • 三
        三毛锅 last edited by

        已经确认设置过了。
        能不能通过网盘给一个测试的工程,我看看区别在哪?

        1 Reply Last reply Reply Quote 0
        • D
          Darzen @三毛锅 last edited by Darzen

          @三毛锅 你好,本文已更新。你在之前修改的代码基础上添加 glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8);。

          1 Reply Last reply Reply Quote 0
          • 三
            三毛锅 last edited by

            glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8);
            这个方案我之前有用过,虽然可以把视频显示出来,但是会有一个问题。
            如果某个场景中有Mask节点,creator中层级管理器中所有在这个Mask节点顺序下面的(不一定要求是子节点),都会显示不出来,并且整个场景直接变成白色。

            1 Reply Last reply Reply Quote 0
            • D
              Darzen @三毛锅 last edited by

              @三毛锅 我加了mask测试显示正常,没有出现白屏或者显示不出来的bug😂

              1 Reply Last reply Reply Quote 0
              • 三
                三毛锅 last edited by

                发现原因了,我之前查的资料
                setEGLConfigChooser的最后一个参数都是填的0,这样的话,Mask组件就会导致场景白屏
                用了你的这个参数以后可以正常了
                谢谢了。

                D 1 Reply Last reply Reply Quote 0
                • D
                  Darzen @三毛锅 last edited by

                  @三毛锅 :不客气☺

                  1 Reply Last reply Reply Quote 0
                  • M
                    mengxianlei last edited by

                    您好,想请问下,按照文档操作,ios端正常,但是android端视频还是被黑色背景挡住了, Camera 组件上的 backgroundColor 的R、G、B、A全部设为 0 已确认,glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8);
                    glSurfaceView.getHolder().setFormat(PixelFormat.RGBA_8888); 这两行代码也是添加了 也取消视频为最顶层,请问除了这些还有哪些需要修改的吗

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Darzen @mengxianlei last edited by

                      @mengxianlei 在 AppActivity 里添加一行代码: glSurfaceView.setZOrderMediaOverlay(true);

                      1 Reply Last reply Reply Quote 0
                      • M
                        miles last edited by

                        大佬3.0版本怎么操作啊

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB | Contributors