Git Product home page Git Product logo

Comments (12)

CarGuo avatar CarGuo commented on June 11, 2024

不是很理解你的问题,我感觉就是 onCompletion 没有调用到还是???

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

不是很理解你的问题,我感觉就是 onCompletion 没有调用到还是???

调用到了,这种场景播放器状态错误和控制失效了,你可以切分支跑了看一下。

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 11, 2024

没很理解你的场景,如果你需要多个,可以尝试 demo 的 MultiSampleVideo

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

没很理解你的场景,如果你需要多个,可以尝试 demo 的 MultiSampleVideo

现象录屏如下,场景就是Acitivity第一层放了ListGSYVideoPlayer,Fragment(也放了一个ListGSYVideoPlayer)切换后,Activity中的ListGSYVideoPlayer控制失效了,暂时没考虑用MultiSampleVideo。

Screen_recording_20240417_135640.mp4

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 11, 2024

不用 MultiSampleVideo, 那么基本上就是用过就会被释放了,返回后你需要重新实例化构建,本质上还是单个内核····

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

不用 MultiSampleVideo, 那么基本上就是用过就会被释放了,返回后你需要重新实例化构建,本质上还是单个内核····

主要是 StandardGSYVideoPlayer是这个场景正常的,可能轮播稍微复杂一点

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 11, 2024

但是 list 的,最多就是 onCompletion、onAutoCompletion 和 releaseVideos 这几个的区别啊,特别是 releaseVideos 因为 #3892 所以多加了 super.onCompletion();

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

但是 list 的,最多就是 onCompletion、onAutoCompletion 和 releaseVideos 这几个的区别啊,特别是 releaseVideos 因为 #3892 所以多加了 super.onCompletion();

是的,我有看过这个issue。所以我就觉得还是ListGSYVideoPlayer哪里没处理好

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 11, 2024

有可能出现问题的,也就是上面三个方法

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

有可能出现问题的,也就是上面三个方法

    Log.i(TAG, "onCompletion: 1 mPlayPosition=" + mPlayPosition + ",size=" + mUriList.size());
    if (mPlayPosition < (mUriList.size())) {
        mAudioManager.abandonAudioFocus(onAudioFocusChangeListener);
        return;
    }
    Log.i(TAG, "onCompletion: 2");

还是这里的问题,对比了onCompletion、onAutoCompletion 和 releaseVideos这三个方法都加了log,确实发现打印不一样。我现在的做法是增加一个set方法更新mPlayPosition值,这种业务场景就手动调一下让它满足条件调super.onCompletion()。
大佬有没有好的解决办法尼。

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 11, 2024

onAutoCompletion 和 onCompletion 的区别,主要还是前者是播放完自动结束,后者是被动结束,具体我感觉还是要看你的业务需要

from gsyvideoplayer.

Hynsn avatar Hynsn commented on June 11, 2024

onAutoCompletion 和 onCompletion 的区别,主要还是前者是播放完自动结束,后者是被动结束,具体我感觉还是要看你的业务需要

我先关闭了,看看库里面能不能兼容一下这种场景。

from gsyvideoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.