Skip to content

Commit ceb45a6

Browse files
author
Tom Jenkinson
committed
implement activateAudioElement()
refs #9
1 parent 9124878 commit ceb45a6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/stream.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,11 @@ module.exports = (trackPath, secretToken) => {
6666
return playerApi(player);
6767
});
6868
};
69+
70+
/**
71+
* Call this from a user interaction, before creating a player, to ensure that playback
72+
* can start even if `play()` is not from a user interaction.
73+
*/
74+
module.exports.activateAudioElement = () => {
75+
SCAudio.activateAudioElement();
76+
};

0 commit comments

Comments
 (0)