AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.
https://airensoft.com/ome.html
MIT License
508 stars 126 forks source link

Vue 3 oven player instans update volume and full screen replays video and start again llhls #407

Open zdimaz opened 8 months ago

zdimaz commented 8 months ago

fullscreenChangedHandler setVolume

Vue 3 oven player instans update volume and full screen replay video llhls

<video-player
        ref="player"
        @fullscreenChanged="fullscreenChangedHandler"
/>
        const fullscreenChangedHandler = (value) => {
            isVideoFullScreen.value = value
        }
        const changeVideoVolume = () => {
            player.value?.ovenplayer.playerInstance.setVolume(videoVolume.value)
            )
        }
SangwonOh commented 8 months ago

@zdimaz Hi! I don't understand your issue. What action is causing the issue?

zdimaz commented 8 months ago

@zdimaz Hi! I don't understand your issue. What action is causing the issue?

Hi !

I have a custom player controller, when I change the sound or make a video in full screen the video restarts from the beginning, this was not the case before....

SangwonOh commented 8 months ago

@zdimaz It seems player is initialized every time when reactive value changes. Something like isVideoFullScreen.value = value

Please make sure changing reactive value don't make vue component instant remounted.

zdimaz commented 8 months ago

@zdimaz It seems player is initialized every time when reactive value changes. Something like isVideoFullScreen.value = value

Please make sure changing reactive value don't make vue component instant remounted.

How i can change this ?