Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of typings into sdk for Typescript #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alrickemilien
Copy link

Trying to answer to #69

Implementation may not be as usual, it's nested into the repo and referenced by the package.json.

Other packages implement typings at DefinitelyTyped.

The file index.d.ts into the folder types/soundcloud should be available at base directory of the npm package, next to sdk.js.

@Andrewjeska
Copy link

I'm sorry that this wasn't approved and merged. I'm using this via copy-and-paste and it works well so far.

@@ -23,13 +23,15 @@ module.exports = function(scaudioPlayer) {
let timerId = 0;
let previousPosition = null;
scaudioPlayer.onChange.subscribe(({ playing, seeking, dead }) => {
if (!window) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (dead) {
window.clearTimeout(timerId);
} else if (playing !== undefined || seeking !== undefined) {
doEmit();
}
});
function doEmit() {
if (!window) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants