videojs/video.js

Volume/Mute State Not Preserved Switching Between HTML5 and Flash Techs

Open

#2,066 建立於 2015年4月23日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (7,502 fork)batch import
confirmedgood first issuepinnedunclaimed

倉庫指標

Star
 (39,742 star)
PR 合併指標
 (平均合併 111天 10小時) (30 天內合併 3 個 PR)

描述

I see 2 problems with volume/mute handling in videojs:

  1. Html5 and Flash tech are inconsistent handling volume and muted. Html5 maintains 2 separate variables to hold the value for volume() and muted(). Flash on the other hand sets volume = 0 when muted(true) is called. My guess is Html5 is the proper implementation desired.
  2. The state stored for volume() and muted() are delegated to the Tech. Switching between Techs causes volume and muted states to be lost between the time unloadTech and loadTech is called. A simple hack is to add a couple lines inside loadTech to save the state of muted and volume and then reapply those states inside the techReady function. Going forward, I feel the Player core should hold these states.

I'm working off a modified version of v4.12.5

貢獻者指南