Skip to content

Commit 8fad8a3

Browse files
skerbisCopilot
andauthored
Update assets/vidstack_helper.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1304f18 commit 8fad8a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assets/vidstack_helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
}
2929

3030
function rebuildMediaPlayer(existingPlayer, platform, videoId, placeholder) {
31-
// Store the original attributes and innerHTML
31+
// Store the original attributes and innerHTML, including the style attribute
3232
const attributes = {};
3333
for (let i = 0; i < existingPlayer.attributes.length; i++) {
3434
const attr = existingPlayer.attributes[i];
35-
if (attr.name !== 'src' && attr.name !== 'style') {
35+
if (attr.name !== 'src') { // Preserve all attributes except 'src'
3636
attributes[attr.name] = attr.value;
3737
}
3838
}

0 commit comments

Comments
 (0)