How to use the ember-hifi/hifi-connections/base.create function in ember-hifi

To help you get started, we’ve selected a few ember-hifi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nypublicradio / ember-hifi / tests / helpers / ember-hifi-test-helpers.js View on Github external
let connectionSpy = test.stub(Connection, 'create').callsFake(function(options) {
    let sound = BaseSound.create(Object.assign({}, dummyOps, options));
    next(() => sound.trigger('audio-load-error'));
    return sound;
  });
github nypublicradio / ember-hifi / tests / helpers / ember-hifi-test-helpers.js View on Github external
let connectionSpy = test.stub(Connection, 'create').callsFake(function(options) {
    let sound = BaseSound.create(Object.assign({}, dummyOps, options));
    test.stub(sound, 'play').callsFake(() => sound.trigger('audio-played'));
    test.stub(sound, 'pause').callsFake(() => sound.trigger('audio-paused'));
    
    next(() => sound.trigger('audio-ready'));
    return sound;
  });