Skip to content

微信自动播放hack #5

Open
Open

Description

@yangguansen

目前微信端自动播放音乐还有一种方法:
WeixinJSBridge.invoke('getNetworkType', {}, function(e) {
var audio = document.getElementById('theaudio');
audio.play();
});

Activity

  1. diamont1001 commented on Jan 20, 2017

    @diamont1001

    其实在wx.ready方法下就可以了

    wx.ready(function() {
      audio.play();
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions