Skip to content

抖音兼容矩阵 · 媒体

媒体

chooseImage

mapped

选择图片。

抖音目标方法

chooseImage

策略说明

  • 微信:直连 `wx.chooseImage`
  • 抖音:`tempFilePaths` 字符串转数组,缺失时从 `tempFiles.path` 兜底

chooseMedia

mapped

选择图片或视频。

抖音目标方法

chooseMedia

策略说明

  • 微信:直连 `wx.chooseMedia`
  • 抖音:直连 `tt.chooseMedia`,并补齐 `tempFiles[].tempFilePath/fileType`

chooseVideo

unsupported

选择视频。

抖音目标方法

chooseVideo

策略说明

  • 微信:直连 `wx.chooseVideo`
  • 抖音:无同等 API,调用时按 unsupported 报错

compressImage

native

抖音目标方法

compressImage

策略说明

  • 微信:直连 `wx.compressImage`
  • 抖音:直连 `tt.compressImage`

compressVideo

unsupported

压缩视频文件。

抖音目标方法

compressVideo

策略说明

  • 微信:直连 `wx.compressVideo`
  • 抖音:无同等 API,调用时按 unsupported 报错

createAudioContext

unsupported

创建音频上下文。

抖音目标方法

createAudioContext

策略说明

  • 微信:直连 `wx.createAudioContext`
  • 抖音:无同等 API,调用时按 unsupported 报错

createCameraContext

unsupported

创建相机上下文对象。

抖音目标方法

createCameraContext

策略说明

  • 微信:直连 `wx.createCameraContext`
  • 抖音:无同等 API,调用时按 unsupported 报错

createInnerAudioContext

native

抖音目标方法

createInnerAudioContext

策略说明

  • 微信:直连 `wx.createInnerAudioContext`
  • 抖音:直连 `tt.createInnerAudioContext`

createLivePlayerContext

mapped

创建直播播放器上下文。

抖音目标方法

createLivePlayerContext

策略说明

  • 微信:直连 `wx.createLivePlayerContext`
  • 抖音:直连 `tt.createLivePlayerContext`

createLivePusherContext

unsupported

创建直播推流上下文。

抖音目标方法

createLivePusherContext

策略说明

  • 微信:直连 `wx.createLivePusherContext`
  • 抖音:无同等 API,调用时按 unsupported 报错

createMapContext

native

抖音目标方法

createMapContext

策略说明

  • 微信:直连 `wx.createMapContext`
  • 抖音:直连 `tt.createMapContext`

createMediaAudioPlayer

unsupported

创建媒体音频播放器。

抖音目标方法

createMediaAudioPlayer

策略说明

  • 微信:直连 `wx.createMediaAudioPlayer`
  • 抖音:无同等 API,调用时按 unsupported 报错

createMediaContainer

unsupported

创建媒体容器实例。

抖音目标方法

createMediaContainer

策略说明

  • 微信:直连 `wx.createMediaContainer`
  • 抖音:无同等 API,调用时按 unsupported 报错

createMediaRecorder

mapped

创建媒体录制器。

抖音目标方法

createMediaRecorder

策略说明

  • 微信:直连 `wx.createMediaRecorder`
  • 抖音:直连 `tt.createMediaRecorder`

createVideoContext

native

抖音目标方法

createVideoContext

策略说明

  • 微信:直连 `wx.createVideoContext`
  • 抖音:直连 `tt.createVideoContext`

createVideoDecoder

unsupported

创建视频解码器。

抖音目标方法

createVideoDecoder

策略说明

  • 微信:直连 `wx.createVideoDecoder`
  • 抖音:无同等 API,调用时按 unsupported 报错

createWebAudioContext

unsupported

创建 WebAudio 上下文。

抖音目标方法

createWebAudioContext

策略说明

  • 微信:直连 `wx.createWebAudioContext`
  • 抖音:无同等 API,调用时按 unsupported 报错

cropImage

unsupported

裁剪图片。

抖音目标方法

cropImage

策略说明

  • 微信:直连 `wx.cropImage`
  • 抖音:无同等 API,调用时按 unsupported 报错

editImage

unsupported

编辑图片。

抖音目标方法

editImage

策略说明

  • 微信:直连 `wx.editImage`
  • 抖音:无同等 API,调用时按 unsupported 报错

getAvailableAudioSources

unsupported

抖音目标方法

getAvailableAudioSources

策略说明

  • 微信:直连 `wx.getAvailableAudioSources`
  • 抖音:未提供 tt.getAvailableAudioSources,调用时将返回 not supported

getBackgroundAudioManager

native

抖音目标方法

getBackgroundAudioManager

策略说明

  • 微信:直连 `wx.getBackgroundAudioManager`
  • 抖音:直连 `tt.getBackgroundAudioManager`

getBackgroundAudioPlayerState

unsupported

获取后台音频播放状态。

抖音目标方法

getBackgroundAudioPlayerState

策略说明

  • 微信:直连 `wx.getBackgroundAudioPlayerState`
  • 抖音:无同等 API,调用时按 unsupported 报错

getImageInfo

native

抖音目标方法

getImageInfo

策略说明

  • 微信:直连 `wx.getImageInfo`
  • 抖音:直连 `tt.getImageInfo`

getRecorderManager

native

抖音目标方法

getRecorderManager

策略说明

  • 微信:直连 `wx.getRecorderManager`
  • 抖音:直连 `tt.getRecorderManager`

getVideoInfo

unsupported

获取视频详细信息。

抖音目标方法

getVideoInfo

策略说明

  • 微信:直连 `wx.getVideoInfo`
  • 抖音:无同等 API,调用时按 unsupported 报错

offAudioInterruptionBegin

unsupported

抖音目标方法

offAudioInterruptionBegin

策略说明

  • 微信:直连 `wx.offAudioInterruptionBegin`
  • 抖音:未提供 tt.offAudioInterruptionBegin,调用时将返回 not supported

offAudioInterruptionEnd

unsupported

抖音目标方法

offAudioInterruptionEnd

策略说明

  • 微信:直连 `wx.offAudioInterruptionEnd`
  • 抖音:未提供 tt.offAudioInterruptionEnd,调用时将返回 not supported

offVoIPVideoMembersChanged

unsupported

抖音目标方法

offVoIPVideoMembersChanged

策略说明

  • 微信:直连 `wx.offVoIPVideoMembersChanged`
  • 抖音:未提供 tt.offVoIPVideoMembersChanged,调用时将返回 not supported

onAudioInterruptionBegin

unsupported

抖音目标方法

onAudioInterruptionBegin

策略说明

  • 微信:直连 `wx.onAudioInterruptionBegin`
  • 抖音:未提供 tt.onAudioInterruptionBegin,调用时将返回 not supported

onAudioInterruptionEnd

unsupported

抖音目标方法

onAudioInterruptionEnd

策略说明

  • 微信:直连 `wx.onAudioInterruptionEnd`
  • 抖音:未提供 tt.onAudioInterruptionEnd,调用时将返回 not supported

onBackgroundAudioPause

unsupported

抖音目标方法

onBackgroundAudioPause

策略说明

  • 微信:直连 `wx.onBackgroundAudioPause`
  • 抖音:未提供 tt.onBackgroundAudioPause,调用时将返回 not supported

onBackgroundAudioPlay

unsupported

抖音目标方法

onBackgroundAudioPlay

策略说明

  • 微信:直连 `wx.onBackgroundAudioPlay`
  • 抖音:未提供 tt.onBackgroundAudioPlay,调用时将返回 not supported

onBackgroundAudioStop

unsupported

抖音目标方法

onBackgroundAudioStop

策略说明

  • 微信:直连 `wx.onBackgroundAudioStop`
  • 抖音:未提供 tt.onBackgroundAudioStop,调用时将返回 not supported

onVoIPVideoMembersChanged

unsupported

抖音目标方法

onVoIPVideoMembersChanged

策略说明

  • 微信:直连 `wx.onVoIPVideoMembersChanged`
  • 抖音:未提供 tt.onVoIPVideoMembersChanged,调用时将返回 not supported

pauseBackgroundAudio

unsupported

暂停后台音频。

抖音目标方法

pauseBackgroundAudio

策略说明

  • 微信:直连 `wx.pauseBackgroundAudio`
  • 抖音:无同等 API,调用时按 unsupported 报错

pauseVoice

unsupported

暂停播放语音。

抖音目标方法

pauseVoice

策略说明

  • 微信:直连 `wx.pauseVoice`
  • 抖音:无同等 API,调用时按 unsupported 报错

playBackgroundAudio

unsupported

播放后台音频。

抖音目标方法

playBackgroundAudio

策略说明

  • 微信:直连 `wx.playBackgroundAudio`
  • 抖音:无同等 API,调用时按 unsupported 报错

playVoice

unsupported

播放语音。

抖音目标方法

playVoice

策略说明

  • 微信:直连 `wx.playVoice`
  • 抖音:无同等 API,调用时按 unsupported 报错

previewImage

native

抖音目标方法

previewImage

策略说明

  • 微信:直连 `wx.previewImage`
  • 抖音:直连 `tt.previewImage`

previewMedia

unsupported

预览图片和视频。

抖音目标方法

previewMedia

策略说明

  • 微信:直连 `wx.previewMedia`
  • 抖音:无同等 API,调用时按 unsupported 报错

saveImageToPhotosAlbum

native

抖音目标方法

saveImageToPhotosAlbum

策略说明

  • 微信:直连 `wx.saveImageToPhotosAlbum`
  • 抖音:直连 `tt.saveImageToPhotosAlbum`

saveVideoToPhotosAlbum

unsupported

保存视频到系统相册。

抖音目标方法

saveVideoToPhotosAlbum

策略说明

  • 微信:直连 `wx.saveVideoToPhotosAlbum`
  • 抖音:无同等 API,调用时按 unsupported 报错

seekBackgroundAudio

unsupported

调整后台音频播放进度。

抖音目标方法

seekBackgroundAudio

策略说明

  • 微信:直连 `wx.seekBackgroundAudio`
  • 抖音:无同等 API,调用时按 unsupported 报错

setInnerAudioOption

unsupported

设置内部音频选项。

抖音目标方法

setInnerAudioOption

策略说明

  • 微信:直连 `wx.setInnerAudioOption`
  • 抖音:无同等 API,调用时按 unsupported 报错

stopBackgroundAudio

unsupported

停止后台音频。

抖音目标方法

stopBackgroundAudio

策略说明

  • 微信:直连 `wx.stopBackgroundAudio`
  • 抖音:无同等 API,调用时按 unsupported 报错

stopVoice

unsupported

停止播放语音。

抖音目标方法

stopVoice

策略说明

  • 微信:直连 `wx.stopVoice`
  • 抖音:无同等 API,调用时按 unsupported 报错

subscribeVoIPVideoMembers

unsupported

订阅 VoIP 视频成员变化。

抖音目标方法

subscribeVoIPVideoMembers

策略说明

  • 微信:直连 `wx.subscribeVoIPVideoMembers`
  • 抖音:无同等 API,调用时按 unsupported 报错

Released under the MIT License.