mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix: design tweaks to toasted skin, lint rule tweaks (#44)
This commit is contained in:
@@ -23,12 +23,10 @@ export class TimeRange extends Range {
|
||||
let _fillWidth = 0;
|
||||
if (state._dragging) {
|
||||
_fillWidth = state._pointerRatio * 100;
|
||||
}
|
||||
else if (state.duration > 0) {
|
||||
} else if (state.duration > 0) {
|
||||
if (this.#seekingTime !== null && this.#oldCurrentTime === state.currentTime) {
|
||||
_fillWidth = (this.#seekingTime / state.duration) * 100;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_fillWidth = (state.currentTime / state.duration) * 100;
|
||||
this.#seekingTime = null;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@ export class VolumeRange extends Range {
|
||||
let _fillWidth = 0;
|
||||
if (state._dragging) {
|
||||
_fillWidth = state._pointerRatio * 100;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_fillWidth = state.muted ? 0 : (state.volume || 0) * 100;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,11 +114,9 @@ export function createMediaStore({
|
||||
|
||||
if (type === 'mediastateownerchangerequest') {
|
||||
updateStateOwners({ media: detail });
|
||||
}
|
||||
else if (type === 'containerstateownerchangerequest') {
|
||||
} else if (type === 'containerstateownerchangerequest') {
|
||||
updateStateOwners({ container: detail });
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (const stateObject of Object.values(stateMediator).filter(
|
||||
(stateMediatorEntry): stateMediatorEntry is FacadeProp<any, any, any> => 'set' in stateMediatorEntry,
|
||||
)) {
|
||||
|
||||
@@ -73,41 +73,33 @@ export const fullscreenable = {
|
||||
// Enter fullscreen
|
||||
if (container.requestFullscreen) {
|
||||
container.requestFullscreen();
|
||||
}
|
||||
else if (container.webkitRequestFullscreen) {
|
||||
} else if (container.webkitRequestFullscreen) {
|
||||
// Safari support
|
||||
container.webkitRequestFullscreen();
|
||||
}
|
||||
else if (container.mozRequestFullScreen) {
|
||||
} else if (container.mozRequestFullScreen) {
|
||||
// Firefox support
|
||||
container.mozRequestFullScreen();
|
||||
}
|
||||
else if (container.msRequestFullscreen) {
|
||||
} else if (container.msRequestFullscreen) {
|
||||
// IE/Edge support
|
||||
container.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Exit fullscreen
|
||||
const doc = globalThis.document as any;
|
||||
if (doc.exitFullscreen) {
|
||||
doc.exitFullscreen();
|
||||
}
|
||||
else if (doc.webkitExitFullscreen) {
|
||||
} else if (doc.webkitExitFullscreen) {
|
||||
// Safari support
|
||||
doc.webkitExitFullscreen();
|
||||
}
|
||||
else if (doc.mozCancelFullScreen) {
|
||||
} else if (doc.mozCancelFullScreen) {
|
||||
// Firefox support
|
||||
doc.mozCancelFullScreen();
|
||||
}
|
||||
else if (doc.msExitFullscreen) {
|
||||
} else if (doc.msExitFullscreen) {
|
||||
// IE/Edge support
|
||||
doc.msExitFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
} catch (error) {
|
||||
// Gracefully handle fullscreen API errors (e.g., user interaction required)
|
||||
console.warn('Fullscreen operation failed:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user