@livepeer-frameworks/player-wc 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/fw-dev-mode-panel.js +1 -0
- package/dist/cjs/components/fw-dev-mode-panel.js.map +1 -1
- package/dist/cjs/components/fw-player-controls.js +0 -34
- package/dist/cjs/components/fw-player-controls.js.map +1 -1
- package/dist/cjs/components/fw-player.js +1 -4
- package/dist/cjs/components/fw-player.js.map +1 -1
- package/dist/cjs/styles/shared-styles.js +18 -0
- package/dist/cjs/styles/shared-styles.js.map +1 -1
- package/dist/esm/components/fw-dev-mode-panel.js +1 -0
- package/dist/esm/components/fw-dev-mode-panel.js.map +1 -1
- package/dist/esm/components/fw-player-controls.js +0 -34
- package/dist/esm/components/fw-player-controls.js.map +1 -1
- package/dist/esm/components/fw-player.js +1 -4
- package/dist/esm/components/fw-player.js.map +1 -1
- package/dist/esm/styles/shared-styles.js +18 -0
- package/dist/esm/styles/shared-styles.js.map +1 -1
- package/dist/fw-player.iife.js +22 -24
- package/dist/types/components/fw-player-controls.d.ts +0 -1
- package/package.json +2 -2
- package/src/components/fw-dev-mode-panel.ts +1 -0
- package/src/components/fw-player-controls.ts +0 -34
- package/src/components/fw-player.ts +1 -4
- package/src/styles/shared-styles.ts +18 -0
package/dist/fw-player.iife.js
CHANGED
|
@@ -497,11 +497,20 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
497
497
|
.fw-context-menu-item {
|
|
498
498
|
position: relative;
|
|
499
499
|
display: flex;
|
|
500
|
+
width: 100%;
|
|
501
|
+
justify-content: flex-start;
|
|
502
|
+
gap: 0.5rem;
|
|
500
503
|
cursor: pointer;
|
|
501
504
|
user-select: none;
|
|
502
505
|
align-items: center;
|
|
503
506
|
padding: 0.5rem 0.75rem;
|
|
504
507
|
font-size: 0.875rem;
|
|
508
|
+
text-align: left;
|
|
509
|
+
font: inherit;
|
|
510
|
+
border: none;
|
|
511
|
+
background: transparent;
|
|
512
|
+
appearance: none;
|
|
513
|
+
-webkit-appearance: none;
|
|
505
514
|
outline: none;
|
|
506
515
|
color: hsl(var(--tn-fg));
|
|
507
516
|
transition:
|
|
@@ -540,11 +549,20 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
540
549
|
.fw-context-menu-checkbox {
|
|
541
550
|
position: relative;
|
|
542
551
|
display: flex;
|
|
552
|
+
width: 100%;
|
|
553
|
+
justify-content: flex-start;
|
|
554
|
+
gap: 0.5rem;
|
|
543
555
|
cursor: pointer;
|
|
544
556
|
user-select: none;
|
|
545
557
|
align-items: center;
|
|
546
558
|
padding: 0.5rem 0.5rem 0.5rem 2rem;
|
|
547
559
|
font-size: 0.875rem;
|
|
560
|
+
text-align: left;
|
|
561
|
+
font: inherit;
|
|
562
|
+
border: none;
|
|
563
|
+
background: transparent;
|
|
564
|
+
appearance: none;
|
|
565
|
+
-webkit-appearance: none;
|
|
548
566
|
outline: none;
|
|
549
567
|
color: hsl(var(--tn-fg));
|
|
550
568
|
transition:
|
|
@@ -2919,10 +2937,8 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
2919
2937
|
.playbackMode=${this.playbackMode}
|
|
2920
2938
|
.isContentLive=${e.isEffectivelyLive}
|
|
2921
2939
|
.devMode=${this.devMode}
|
|
2922
|
-
.isDevPanelOpen=${this._isDevPanelOpen}
|
|
2923
2940
|
.isStatsOpen=${this._isStatsOpen}
|
|
2924
2941
|
@fw-stats-toggle=${()=>{this._isStatsOpen=!this._isStatsOpen}}
|
|
2925
|
-
@fw-dev-panel-toggle=${()=>{this._isDevPanelOpen=!this._isDevPanelOpen}}
|
|
2926
2942
|
@fw-mode-change=${e=>{this.playbackMode=e.detail.mode}}
|
|
2927
2943
|
></fw-player-controls>
|
|
2928
2944
|
`}
|
|
@@ -3138,8 +3154,9 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
3138
3154
|
.player-area--dev {
|
|
3139
3155
|
flex: 1;
|
|
3140
3156
|
min-width: 0;
|
|
3157
|
+
min-height: 0;
|
|
3141
3158
|
}
|
|
3142
|
-
`],n([ye({attribute:"content-id"})],e.FwPlayer.prototype,"contentId",void 0),n([ye({attribute:"content-type"})],e.FwPlayer.prototype,"contentType",void 0),n([ye({attribute:"gateway-url"})],e.FwPlayer.prototype,"gatewayUrl",void 0),n([ye({attribute:"mist-url"})],e.FwPlayer.prototype,"mistUrl",void 0),n([ye({attribute:"auth-token"})],e.FwPlayer.prototype,"authToken",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"autoplay",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"muted",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"controls",void 0),n([ye({type:Boolean,attribute:"stock-controls"})],e.FwPlayer.prototype,"stockControls",void 0),n([ye({type:Boolean,attribute:"native-controls"})],e.FwPlayer.prototype,"nativeControls",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"debug",void 0),n([ye({type:Boolean,attribute:"dev-mode"})],e.FwPlayer.prototype,"devMode",void 0),n([ye({attribute:"thumbnail-url"})],e.FwPlayer.prototype,"thumbnailUrl",void 0),n([ye({attribute:"playback-mode"})],e.FwPlayer.prototype,"playbackMode",void 0),n([ye({attribute:!1})],e.FwPlayer.prototype,"endpoints",void 0),n([be()],e.FwPlayer.prototype,"_isStatsOpen",void 0),n([be()],e.FwPlayer.prototype,"_isDevPanelOpen",void 0),n([be()],e.FwPlayer.prototype,"_skipDirection",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuOpen",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuMounted",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuState",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuSide",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuActiveLevel",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuOpenSubmenu",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuSubmenuSide",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuX",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuY",void 0),n([ve("#container")],e.FwPlayer.prototype,"_containerEl",void 0),e.FwPlayer=n([pe("fw-player")],e.FwPlayer);let Qt=class extends he{constructor(){super(...arguments),this.playbackMode="auto",this.isContentLive=!1,this.devMode=!1,this.
|
|
3159
|
+
`],n([ye({attribute:"content-id"})],e.FwPlayer.prototype,"contentId",void 0),n([ye({attribute:"content-type"})],e.FwPlayer.prototype,"contentType",void 0),n([ye({attribute:"gateway-url"})],e.FwPlayer.prototype,"gatewayUrl",void 0),n([ye({attribute:"mist-url"})],e.FwPlayer.prototype,"mistUrl",void 0),n([ye({attribute:"auth-token"})],e.FwPlayer.prototype,"authToken",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"autoplay",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"muted",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"controls",void 0),n([ye({type:Boolean,attribute:"stock-controls"})],e.FwPlayer.prototype,"stockControls",void 0),n([ye({type:Boolean,attribute:"native-controls"})],e.FwPlayer.prototype,"nativeControls",void 0),n([ye({type:Boolean})],e.FwPlayer.prototype,"debug",void 0),n([ye({type:Boolean,attribute:"dev-mode"})],e.FwPlayer.prototype,"devMode",void 0),n([ye({attribute:"thumbnail-url"})],e.FwPlayer.prototype,"thumbnailUrl",void 0),n([ye({attribute:"playback-mode"})],e.FwPlayer.prototype,"playbackMode",void 0),n([ye({attribute:!1})],e.FwPlayer.prototype,"endpoints",void 0),n([be()],e.FwPlayer.prototype,"_isStatsOpen",void 0),n([be()],e.FwPlayer.prototype,"_isDevPanelOpen",void 0),n([be()],e.FwPlayer.prototype,"_skipDirection",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuOpen",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuMounted",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuState",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuSide",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuActiveLevel",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuOpenSubmenu",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuSubmenuSide",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuX",void 0),n([be()],e.FwPlayer.prototype,"_contextMenuY",void 0),n([ve("#container")],e.FwPlayer.prototype,"_containerEl",void 0),e.FwPlayer=n([pe("fw-player")],e.FwPlayer);let Qt=class extends he{constructor(){super(...arguments),this.playbackMode="auto",this.isContentLive=!1,this.devMode=!1,this.showStatsButton=!1,this.isStatsOpen=!1,this._settingsOpen=!1,this._isNearLiveState=!0,this._buffered=null,this._boundVideo=null,this._onBufferedUpdate=null,this._onWindowClick=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&(e.classList.contains("fw-settings-anchor")||e.classList.contains("fw-settings-menu")))||(this._settingsOpen=!1)}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._unbindVideoEvents(),this._detachWindowClickListener()}updated(e){this._bindVideoEvents(),this._reconcileNearLiveState(),e.has("_settingsOpen")&&(this._settingsOpen?this._attachWindowClickListener():this._detachWindowClickListener())}_bindVideoEvents(){const e=this.pc?.s.videoElement??null;if(e===this._boundVideo)return;if(this._unbindVideoEvents(),this._boundVideo=e,!e)return void(this._buffered=null);const t=()=>{this._buffered=this.pc.getBufferedRanges()??e.buffered};t(),e.addEventListener("progress",t),e.addEventListener("loadeddata",t),this._onBufferedUpdate=t}_unbindVideoEvents(){if(!this._boundVideo)return;const e=this._onBufferedUpdate;e&&(this._boundVideo.removeEventListener("progress",e),this._boundVideo.removeEventListener("loadeddata",e)),this._boundVideo=null,this._onBufferedUpdate=null}_attachWindowClickListener(){window.setTimeout(()=>{this._settingsOpen&&window.addEventListener("click",this._onWindowClick)},0)}_detachWindowClickListener(){window.removeEventListener("click",this._onWindowClick)}_deriveBufferWindowMs(e){if(!e)return;const t=Object.values(e);if(0===t.length)return;const n=t.map(e=>e.firstms).filter(e=>"number"==typeof e),i=t.map(e=>e.lastms).filter(e=>"number"==typeof e);if(0===n.length||0===i.length)return;const r=Math.max(...n),s=Math.min(...i)-r;return!Number.isFinite(s)||s<=0?void 0:s}_getSeekingContext(){const e=this.pc.s,t=this.pc.getController(),n=e.currentSourceInfo?.type,i=e.streamState?.streamInfo,r=function(e,t,n){return void 0!==e?e:t?.type?"live"===t.type:!Number.isFinite(n)}(this.isContentLive,i,e.duration),s=i?.meta?.buffer_window??this._deriveBufferWindowMs(i?.meta?.tracks),a=St(e.videoElement),o=St(e.videoElement)&&void 0!==s&&s>0&&"whep"!==n&&"webrtc"!==n,l=kt({isLive:r,video:e.videoElement,mistStreamInfo:i,currentTime:e.currentTime,duration:e.duration,allowMediaStreamDvr:o}),u=this.pc.getSeekableStart(),d=this.pc.getLiveEdge(),c=Number.isFinite(u)&&Number.isFinite(d)&&d>=u&&(d>0||u>0),h=c?u:l.seekableStart,f=c?d:l.liveEdge,p=r&&Number.isFinite(f)&&Number.isFinite(h)&&f>h;return{mistStreamInfo:i,isLive:r,sourceType:n,seekableStart:h,liveEdge:f,hasDvrWindow:p,canSeek:(t?.canSeekStream?.()??It({video:e.videoElement,isLive:r,duration:e.duration,bufferWindowMs:s}))&&(!r||p),commitOnRelease:r,liveThresholds:At(n,a,s)}}_reconcileNearLiveState(){const e=this._getSeekingContext();if(!e.isLive)return void(this._isNearLiveState||(this._isNearLiveState=!0));const t=Ct(this.pc.s.currentTime,e.liveEdge,e.liveThresholds,this._isNearLiveState);t!==this._isNearLiveState&&(this._isNearLiveState=t)}_handleModeChange(e){const{mode:t}=e.detail;this.dispatchEvent(new CustomEvent("fw-mode-change",{detail:{mode:t},bubbles:!0,composed:!0}))}render(){const e=this.pc.s,t=!e.videoElement,n=this._getSeekingContext(),i=e.shouldShowControls||e.isPaused||!e.hasPlaybackStarted||e.shouldShowIdleScreen||!!e.error||this._settingsOpen,r=$t({isLive:n.isLive,currentTime:e.currentTime,duration:e.duration,liveEdge:n.liveEdge,seekableStart:n.seekableStart,unixoffset:n.mistStreamInfo?.unixoffset}),s=!n.hasDvrWindow||this._isNearLiveState;return W`
|
|
3143
3160
|
<div
|
|
3144
3161
|
class=${Se({"fw-player-surface":!0,"fw-controls-wrapper":!0,"fw-controls-wrapper--visible":i,"fw-controls-wrapper--hidden":!i})}
|
|
3145
3162
|
>
|
|
@@ -3263,20 +3280,6 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
3263
3280
|
</button>
|
|
3264
3281
|
</div>
|
|
3265
3282
|
`:X}
|
|
3266
|
-
${this.devMode?W`
|
|
3267
|
-
<div class="fw-control-group">
|
|
3268
|
-
<button
|
|
3269
|
-
type="button"
|
|
3270
|
-
class=${Se({"fw-btn-flush":!0,"fw-btn-flush--active":this.isDevPanelOpen})}
|
|
3271
|
-
aria-label=${this.isDevPanelOpen?"Hide advanced settings sidebar":"Show advanced settings sidebar"}
|
|
3272
|
-
title=${this.isDevPanelOpen?"Hide advanced sidebar":"Advanced sidebar"}
|
|
3273
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("fw-dev-panel-toggle",{bubbles:!0,composed:!0}))}
|
|
3274
|
-
>
|
|
3275
|
-
<span class="fw-dev-toggle-label">ADV</span>
|
|
3276
|
-
</button>
|
|
3277
|
-
</div>
|
|
3278
|
-
`:X}
|
|
3279
|
-
|
|
3280
3283
|
<div class="fw-control-group fw-settings-anchor">
|
|
3281
3284
|
<button
|
|
3282
3285
|
type="button"
|
|
@@ -3344,13 +3347,7 @@ function ve(e,t){return(t,n,i)=>((e,t,n)=>(n.configurable=!0,n.enumerable=!0,Ref
|
|
|
3344
3347
|
.fw-settings-anchor {
|
|
3345
3348
|
position: relative;
|
|
3346
3349
|
}
|
|
3347
|
-
|
|
3348
|
-
.fw-dev-toggle-label {
|
|
3349
|
-
font-size: 10px;
|
|
3350
|
-
font-weight: 700;
|
|
3351
|
-
letter-spacing: 0.08em;
|
|
3352
|
-
}
|
|
3353
|
-
`],n([ye({attribute:!1})],Qt.prototype,"pc",void 0),n([ye({type:String})],Qt.prototype,"playbackMode",void 0),n([ye({type:Boolean,attribute:"is-content-live"})],Qt.prototype,"isContentLive",void 0),n([ye({type:Boolean,attribute:"dev-mode"})],Qt.prototype,"devMode",void 0),n([ye({type:Boolean,attribute:"is-dev-panel-open"})],Qt.prototype,"isDevPanelOpen",void 0),n([ye({type:Boolean,attribute:"show-stats-button"})],Qt.prototype,"showStatsButton",void 0),n([ye({type:Boolean,attribute:"is-stats-open"})],Qt.prototype,"isStatsOpen",void 0),n([be()],Qt.prototype,"_settingsOpen",void 0),n([be()],Qt.prototype,"_isNearLiveState",void 0),n([be()],Qt.prototype,"_buffered",void 0),Qt=n([pe("fw-player-controls")],Qt);
|
|
3350
|
+
`],n([ye({attribute:!1})],Qt.prototype,"pc",void 0),n([ye({type:String})],Qt.prototype,"playbackMode",void 0),n([ye({type:Boolean,attribute:"is-content-live"})],Qt.prototype,"isContentLive",void 0),n([ye({type:Boolean,attribute:"dev-mode"})],Qt.prototype,"devMode",void 0),n([ye({type:Boolean,attribute:"show-stats-button"})],Qt.prototype,"showStatsButton",void 0),n([ye({type:Boolean,attribute:"is-stats-open"})],Qt.prototype,"isStatsOpen",void 0),n([be()],Qt.prototype,"_settingsOpen",void 0),n([be()],Qt.prototype,"_isNearLiveState",void 0),n([be()],Qt.prototype,"_buffered",void 0),Qt=n([pe("fw-player-controls")],Qt);
|
|
3354
3351
|
/**
|
|
3355
3352
|
* @license
|
|
3356
3353
|
* Copyright 2018 Google LLC
|
|
@@ -5379,6 +5376,7 @@ const Xt="important",Jt=" !"+Xt,Zt=_e(class extends Ee{constructor(e){if(super(e
|
|
|
5379
5376
|
:host {
|
|
5380
5377
|
display: block;
|
|
5381
5378
|
height: 100%;
|
|
5379
|
+
min-height: 0;
|
|
5382
5380
|
}
|
|
5383
5381
|
`],n([ye({attribute:!1})],_n.prototype,"pc",void 0),n([ye({type:String})],_n.prototype,"playbackMode",void 0),n([be()],_n.prototype,"_activeTab",void 0),n([be()],_n.prototype,"_hoveredComboIndex",void 0),n([be()],_n.prototype,"_tooltipAbove",void 0),n([be()],_n.prototype,"_showDisabledPlayers",void 0),n([be()],_n.prototype,"_playbackScore",void 0),n([be()],_n.prototype,"_qualityScore",void 0),n([be()],_n.prototype,"_stallCount",void 0),n([be()],_n.prototype,"_frameDropRate",void 0),n([be()],_n.prototype,"_videoStats",void 0),n([be()],_n.prototype,"_playerStats",void 0),_n=n([pe("fw-dev-mode-panel")],_n);const En={fontSize:"1.5rem",fontFamily:"system-ui, -apple-system, sans-serif",color:"white",backgroundColor:"rgba(0, 0, 0, 0.75)",textShadow:"2px 2px 4px rgba(0, 0, 0, 0.5)",bottom:"5%",maxWidth:"90%",padding:"0.5em 1em",borderRadius:"4px"};let Sn=class extends he{constructor(){super(...arguments),this.currentTime=0,this.enabled=!0,this.cues=[],this.className="",this._liveCues=[],this._displayedText="",this._unsubscribe=null,this._handleMetaEvent=e=>{if("subtitle"!==e.type)return;const t=this._parseSubtitleCue(e.data);t&&(this._liveCues=(()=>this._liveCues.find(e=>e.id===t.id)?this._liveCues:[...this._liveCues,t].slice(-50))())}}disconnectedCallback(){super.disconnectedCallback(),this._teardownSubscription()}updated(e){(e.has("enabled")||e.has("subscribeToMetaTrack")||e.has("metaTrackId"))&&this._syncSubscription(),(e.has("currentTime")||e.has("_liveCues"))&&this._pruneExpiredLiveCues(),(e.has("enabled")||e.has("currentTime")||e.has("cues")||e.has("_liveCues"))&&this._syncDisplayedCue()}_syncSubscription(){this._teardownSubscription(),this.enabled&&this.subscribeToMetaTrack&&this.metaTrackId&&(this._unsubscribe=this.subscribeToMetaTrack(this.metaTrackId,this._handleMetaEvent))}_teardownSubscription(){this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)}_parseSubtitleCue(e){if("object"!=typeof e||null===e)return null;const t=e,n="string"==typeof t.text?t.text:String(t.text??"");if(!n)return null;const i="startTime"in t?Number(t.startTime):"start"in t?Number(t.start):0,r="endTime"in t?Number(t.endTime):"end"in t?Number(t.end):1/0,s=Number.isFinite(i)?i:0,a=Number.isFinite(r)?r:1/0;return{id:"string"==typeof t.id?t.id:String(Date.now()+Math.random()),text:n,startTime:s,endTime:a,lang:"string"==typeof t.lang?t.lang:void 0}}_getAllCues(){return[...this.cues??[],...this._liveCues]}_syncDisplayedCue(){if(!this.enabled)return void(this._displayedText&&(this._displayedText=""));const e=1e3*this.currentTime,t=this._getAllCues().find(t=>e>=t.startTime&&e<t.endTime),n=t?.text??"";n!==this._displayedText&&(this._displayedText=n)}_pruneExpiredLiveCues(){if(0===this._liveCues.length)return;const e=1e3*this.currentTime,t=this._liveCues.filter(t=>(t.endTime===1/0?t.startTime+1e4:t.endTime)>=e-3e4);t.length!==this._liveCues.length&&(this._liveCues=t)}render(){if(!this.enabled||!this._displayedText)return X;const e={...En,...this.subtitleStyle??{}};return W`
|
|
5384
5382
|
<div
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livepeer-frameworks/player-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lit Web Components for FrameWorks streaming player — <fw-player> custom element with full UI",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"lit": "^3.2.0",
|
|
32
|
-
"@livepeer-frameworks/player-core": "0.1.
|
|
32
|
+
"@livepeer-frameworks/player-core": "0.1.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -49,7 +49,6 @@ export class FwPlayerControls extends LitElement {
|
|
|
49
49
|
@property({ type: String }) playbackMode: PlaybackMode = "auto";
|
|
50
50
|
@property({ type: Boolean, attribute: "is-content-live" }) isContentLive = false;
|
|
51
51
|
@property({ type: Boolean, attribute: "dev-mode" }) devMode = false;
|
|
52
|
-
@property({ type: Boolean, attribute: "is-dev-panel-open" }) isDevPanelOpen = false;
|
|
53
52
|
@property({ type: Boolean, attribute: "show-stats-button" }) showStatsButton = false;
|
|
54
53
|
@property({ type: Boolean, attribute: "is-stats-open" }) isStatsOpen = false;
|
|
55
54
|
|
|
@@ -71,12 +70,6 @@ export class FwPlayerControls extends LitElement {
|
|
|
71
70
|
.fw-settings-anchor {
|
|
72
71
|
position: relative;
|
|
73
72
|
}
|
|
74
|
-
|
|
75
|
-
.fw-dev-toggle-label {
|
|
76
|
-
font-size: 10px;
|
|
77
|
-
font-weight: 700;
|
|
78
|
-
letter-spacing: 0.08em;
|
|
79
|
-
}
|
|
80
73
|
`,
|
|
81
74
|
];
|
|
82
75
|
|
|
@@ -468,33 +461,6 @@ export class FwPlayerControls extends LitElement {
|
|
|
468
461
|
</div>
|
|
469
462
|
`
|
|
470
463
|
: nothing}
|
|
471
|
-
${this.devMode
|
|
472
|
-
? html`
|
|
473
|
-
<div class="fw-control-group">
|
|
474
|
-
<button
|
|
475
|
-
type="button"
|
|
476
|
-
class=${classMap({
|
|
477
|
-
"fw-btn-flush": true,
|
|
478
|
-
"fw-btn-flush--active": this.isDevPanelOpen,
|
|
479
|
-
})}
|
|
480
|
-
aria-label=${this.isDevPanelOpen
|
|
481
|
-
? "Hide advanced settings sidebar"
|
|
482
|
-
: "Show advanced settings sidebar"}
|
|
483
|
-
title=${this.isDevPanelOpen ? "Hide advanced sidebar" : "Advanced sidebar"}
|
|
484
|
-
@click=${() =>
|
|
485
|
-
this.dispatchEvent(
|
|
486
|
-
new CustomEvent("fw-dev-panel-toggle", {
|
|
487
|
-
bubbles: true,
|
|
488
|
-
composed: true,
|
|
489
|
-
})
|
|
490
|
-
)}
|
|
491
|
-
>
|
|
492
|
-
<span class="fw-dev-toggle-label">ADV</span>
|
|
493
|
-
</button>
|
|
494
|
-
</div>
|
|
495
|
-
`
|
|
496
|
-
: nothing}
|
|
497
|
-
|
|
498
464
|
<div class="fw-control-group fw-settings-anchor">
|
|
499
465
|
<button
|
|
500
466
|
type="button"
|
|
@@ -82,6 +82,7 @@ export class FwPlayer extends LitElement {
|
|
|
82
82
|
.player-area--dev {
|
|
83
83
|
flex: 1;
|
|
84
84
|
min-width: 0;
|
|
85
|
+
min-height: 0;
|
|
85
86
|
}
|
|
86
87
|
`,
|
|
87
88
|
];
|
|
@@ -811,14 +812,10 @@ export class FwPlayer extends LitElement {
|
|
|
811
812
|
.playbackMode=${this.playbackMode}
|
|
812
813
|
.isContentLive=${s.isEffectivelyLive}
|
|
813
814
|
.devMode=${this.devMode}
|
|
814
|
-
.isDevPanelOpen=${this._isDevPanelOpen}
|
|
815
815
|
.isStatsOpen=${this._isStatsOpen}
|
|
816
816
|
@fw-stats-toggle=${() => {
|
|
817
817
|
this._isStatsOpen = !this._isStatsOpen;
|
|
818
818
|
}}
|
|
819
|
-
@fw-dev-panel-toggle=${() => {
|
|
820
|
-
this._isDevPanelOpen = !this._isDevPanelOpen;
|
|
821
|
-
}}
|
|
822
819
|
@fw-mode-change=${(event: CustomEvent<{ mode: PlaybackMode }>) => {
|
|
823
820
|
this.playbackMode = event.detail.mode;
|
|
824
821
|
}}
|
|
@@ -442,11 +442,20 @@ export const sharedStyles = css`
|
|
|
442
442
|
.fw-context-menu-item {
|
|
443
443
|
position: relative;
|
|
444
444
|
display: flex;
|
|
445
|
+
width: 100%;
|
|
446
|
+
justify-content: flex-start;
|
|
447
|
+
gap: 0.5rem;
|
|
445
448
|
cursor: pointer;
|
|
446
449
|
user-select: none;
|
|
447
450
|
align-items: center;
|
|
448
451
|
padding: 0.5rem 0.75rem;
|
|
449
452
|
font-size: 0.875rem;
|
|
453
|
+
text-align: left;
|
|
454
|
+
font: inherit;
|
|
455
|
+
border: none;
|
|
456
|
+
background: transparent;
|
|
457
|
+
appearance: none;
|
|
458
|
+
-webkit-appearance: none;
|
|
450
459
|
outline: none;
|
|
451
460
|
color: hsl(var(--tn-fg));
|
|
452
461
|
transition:
|
|
@@ -485,11 +494,20 @@ export const sharedStyles = css`
|
|
|
485
494
|
.fw-context-menu-checkbox {
|
|
486
495
|
position: relative;
|
|
487
496
|
display: flex;
|
|
497
|
+
width: 100%;
|
|
498
|
+
justify-content: flex-start;
|
|
499
|
+
gap: 0.5rem;
|
|
488
500
|
cursor: pointer;
|
|
489
501
|
user-select: none;
|
|
490
502
|
align-items: center;
|
|
491
503
|
padding: 0.5rem 0.5rem 0.5rem 2rem;
|
|
492
504
|
font-size: 0.875rem;
|
|
505
|
+
text-align: left;
|
|
506
|
+
font: inherit;
|
|
507
|
+
border: none;
|
|
508
|
+
background: transparent;
|
|
509
|
+
appearance: none;
|
|
510
|
+
-webkit-appearance: none;
|
|
493
511
|
outline: none;
|
|
494
512
|
color: hsl(var(--tn-fg));
|
|
495
513
|
transition:
|