Only change default from settings page
This commit is contained in:
parent
524eeff745
commit
ef7e6a56b4
5 changed files with 4 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { FormField } from 'component/common/form';
|
||||
import { VIDEO_QUALITY_OPTIONS } from 'constants/video';
|
||||
import { VIDEO_QUALITY_OPTIONS } from 'constants/player';
|
||||
import { toCapitalCase } from 'util/string';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -23,12 +23,7 @@ import VideoViewer from './view';
|
|||
import { withRouter } from 'react-router';
|
||||
import { doClaimEligiblePurchaseRewards } from 'redux/actions/rewards';
|
||||
import { selectDaemonSettings, selectClientSetting, selectHomepageData } from 'redux/selectors/settings';
|
||||
import {
|
||||
toggleVideoTheaterMode,
|
||||
toggleAutoplayNext,
|
||||
doSetClientSetting,
|
||||
doSetDefaultVideoQuality,
|
||||
} from 'redux/actions/settings';
|
||||
import { toggleVideoTheaterMode, toggleAutoplayNext, doSetClientSetting } from 'redux/actions/settings';
|
||||
import { selectUserVerifiedEmail, selectUser } from 'redux/selectors/user';
|
||||
|
||||
const select = (state, props) => {
|
||||
|
@ -107,7 +102,6 @@ const perform = (dispatch) => ({
|
|||
),
|
||||
doAnalyticsView: (uri, timeToStart) => dispatch(doAnalyticsView(uri, timeToStart)),
|
||||
claimRewards: () => dispatch(doClaimEligiblePurchaseRewards()),
|
||||
doSetDefaultVideoQuality: (value) => dispatch(doSetDefaultVideoQuality(value)),
|
||||
});
|
||||
|
||||
export default withRouter(connect(select, perform)(VideoViewer));
|
||||
|
|
|
@ -3,7 +3,7 @@ import videojs from 'video.js';
|
|||
import { version as VERSION } from './package.json';
|
||||
import ConcreteButton from './ConcreteButton';
|
||||
import ConcreteMenuItem from './ConcreteMenuItem';
|
||||
import * as QUALITY_OPTIONS from 'constants/video';
|
||||
import * as QUALITY_OPTIONS from 'constants/player';
|
||||
import { safeGetComputedStyle, simpleSelector } from '../videojs-http-streaming--override/playlist-selectors';
|
||||
|
||||
// Default options for the plugin.
|
||||
|
@ -287,14 +287,13 @@ class HlsQualitySelectorPlugin {
|
|||
* @param {number} height - A number representing HLS playlist.
|
||||
*/
|
||||
setQuality(height) {
|
||||
const { doSetDefaultVideoQuality } = this.config;
|
||||
const qualityList = this.player.qualityLevels();
|
||||
|
||||
// Set quality on plugin
|
||||
this._currentQuality = height;
|
||||
doSetDefaultVideoQuality(height);
|
||||
|
||||
if (this.config.displayCurrentQuality) {
|
||||
console.log(height);
|
||||
this.setButtonInnerText(
|
||||
height === QUALITY_OPTIONS.AUTO
|
||||
? QUALITY_OPTIONS.AUTO
|
||||
|
|
|
@ -85,7 +85,6 @@ type Props = {
|
|||
userId: ?number,
|
||||
videoTheaterMode: boolean,
|
||||
defaultQuality: ?string,
|
||||
doSetDefaultVideoQuality: (value: ?string) => void,
|
||||
onPlayerReady: (Player, any) => void,
|
||||
playNext: () => void,
|
||||
playPrevious: () => void,
|
||||
|
@ -147,7 +146,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
userId,
|
||||
videoTheaterMode,
|
||||
defaultQuality,
|
||||
doSetDefaultVideoQuality,
|
||||
onPlayerReady,
|
||||
playNext,
|
||||
playPrevious,
|
||||
|
@ -286,7 +284,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
displayCurrentQuality: true,
|
||||
originalHeight: claimValues?.video?.height,
|
||||
defaultQuality,
|
||||
doSetDefaultVideoQuality,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ type Props = {
|
|||
isLivestreamClaim: boolean,
|
||||
activeLivestreamForChannel: any,
|
||||
defaultQuality: ?string,
|
||||
doSetDefaultVideoQuality: (value: ?string) => void,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -118,7 +117,6 @@ function VideoViewer(props: Props) {
|
|||
isLivestreamClaim,
|
||||
activeLivestreamForChannel,
|
||||
defaultQuality,
|
||||
doSetDefaultVideoQuality,
|
||||
} = props;
|
||||
|
||||
const permanentUrl = claim && claim.permanent_url;
|
||||
|
@ -517,7 +515,6 @@ function VideoViewer(props: Props) {
|
|||
isLivestreamClaim={isLivestreamClaim}
|
||||
activeLivestreamForChannel={activeLivestreamForChannel}
|
||||
defaultQuality={defaultQuality}
|
||||
doSetDefaultVideoQuality={doSetDefaultVideoQuality}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue