Skip to content

Commit 8d0960c

Browse files
authored
Merge pull request #87 from soundcloud/implement-activate-audio-element
Implement SC.stream.activateAudioElement()
2 parents 9124878 + 33ec181 commit 8d0960c

2 files changed

Lines changed: 18 additions & 9 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)