@raydiant/playlist-window-manager 0.29.0 → 0.29.1-rc1
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 +9 -0
- package/package.json +1 -1
- package/src/preload.ts +15 -0
package/build/preload.js
CHANGED
|
@@ -89,3 +89,12 @@ 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.
|
|
96
|
+
window.addEventListener('DOMContentLoaded', function () {
|
|
97
|
+
var style = document.createElement('style');
|
|
98
|
+
style.textContent = "\n video::-internal-media-controls-overlay-cast-button {\n display: none !important;\n }\n ";
|
|
99
|
+
document.head.append(style);
|
|
100
|
+
});
|
package/package.json
CHANGED
package/src/preload.ts
CHANGED
|
@@ -106,3 +106,18 @@ 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.
|
|
114
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
115
|
+
const style = document.createElement('style');
|
|
116
|
+
style.textContent = `
|
|
117
|
+
video::-internal-media-controls-overlay-cast-button {
|
|
118
|
+
display: none !important;
|
|
119
|
+
}
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
document.head.append(style);
|
|
123
|
+
});
|