Merge pull request #1008 from OldTaoge/master

This commit is contained in:
DIYgod 2022-08-15 18:54:05 +01:00 committed by GitHub
commit 69dfac4fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -745,11 +745,11 @@ const dp = new DPlayer({
apiBackend: {
read: function (options) {
console.log('Pretend to connect WebSocket');
callback();
options.success([]);
},
send: function (options) {
console.log('Pretend to send danmaku via WebSocket', options.data);
callback();
options.success();
},
},
video: {

View File

@ -727,13 +727,13 @@ const dp = new DPlayer({
live: true,
danmaku: true,
apiBackend: {
read: function (endpoint, callback) {
read: function (options) {
console.log('Pretend to connect WebSocket');
callback();
options.success([]);
},
send: function (endpoint, danmakuData, callback) {
console.log('Pretend to send danmaku via WebSocket', danmakuData);
callback();
send: function (options) {
console.log('Pretend to send danmaku via WebSocket', options.data);
options.success();
},
},
video: {