@raydiant/playlist-window-manager 0.29.0 → 0.29.1
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/build/preload.js +11 -0
- package/package.json +1 -1
- package/src/preload.ts +17 -0
package/build/preload.js
CHANGED
|
@@ -89,3 +89,14 @@ Object.defineProperty(window, 'removeEventListener', {
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
});
|
|
92
|
+
// Hide the Cast button on video elements to prevent casting from the device.
|
|
93
|
+
// After trying many different approaches including flags, chrome policies and
|
|
94
|
+
// blocking ports, the only reliable way to hide the Cast button is via CSS without
|
|
95
|
+
// updating every video element with disableRemotePlayback. This issue has only been
|
|
96
|
+
// observed on older devices like the IntelComputeStick and Vivostick, not newer devices
|
|
97
|
+
// like the N100 or NUC.
|
|
98
|
+
window.addEventListener('DOMContentLoaded', function () {
|
|
99
|
+
var style = document.createElement('style');
|
|
100
|
+
style.textContent = "\n video::-internal-media-controls-overlay-cast-button {\n display: none !important;\n }\n ";
|
|
101
|
+
document.head.append(style);
|
|
102
|
+
});
|
package/package.json
CHANGED
package/src/preload.ts
CHANGED
|
@@ -106,3 +106,20 @@ Object.defineProperty(window, 'removeEventListener', {
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
|
+
|
|
110
|
+
// Hide the Cast button on video elements to prevent casting from the device.
|
|
111
|
+
// After trying many different approaches including flags, chrome policies and
|
|
112
|
+
// blocking ports, the only reliable way to hide the Cast button is via CSS without
|
|
113
|
+
// updating every video element with disableRemotePlayback. This issue has only been
|
|
114
|
+
// observed on older devices like the IntelComputeStick and Vivostick, not newer devices
|
|
115
|
+
// like the N100 or NUC.
|
|
116
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
117
|
+
const style = document.createElement('style');
|
|
118
|
+
style.textContent = `
|
|
119
|
+
video::-internal-media-controls-overlay-cast-button {
|
|
120
|
+
display: none !important;
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
document.head.append(style);
|
|
125
|
+
});
|