audio call

// audio player status code

  /**
   0: 'init'
   1: 'loading'
   2: 'play'
   3: 'pause'
   4: 'complete'
   5: 'error'
   */

1:App call JS 修改 audio 的播放状态

{
  "func": "emit",
  "args": {
    "event": "change-audio-play-status",
    "args": {
      "status": "Integer",
      "id": "Integer"
    }
  }
}

2:App call JS 修改 audio 的播放 id

{
  "func": "emit",
  "args": {
    "event": "change-audio-play-id",
    "args": {
      "id": "Integer"
    }
  }
}

3:Js call App 设置要播放的 audio id

{
  "func": "Audio.Instance.SetAudioItem",
  "args": {
    "id": "Integer",
    "list": "JSON",
    "book": "Object or null"
  }
}

4:Js call App 修改音频的状态

{
  "func": "Audio.Instance.ChangeAudioPlayStatus",
  "args": {
    "status": "Integer",
    "id": "Integer",
    "list": "JSON",
    "book": "Object or null"
  }
}

5:App call JS 购买文章

{
  "func": "emit",
  "args": {
    "event": "buy-note-from-audio",
    "args": {
      "noteId": "Integer"
    }
  }
}

6:App call JS 购买连载

{
  "func": "emit",
  "args": {
    "event": "buy-book-from-audio",
    "args": {
      "bookId": "Integer"
    }
  }
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容