HTML5视频仅在通过Chrome中的链接访问网页后加载

时间:2018-05-09 21:11:11

标签: google-chrome video html5-video loading

我运行一个wordpress网站,首页显示一个HTML5视频,它在一个循环中加载和自动播放,这里是代码:

let obj = {"slug": "18-AZ-Gov-GE-DvF","name": "2018 Arizona Gubernatorial GE","tags": [],"charts": [],"election_date": "2018-11-06","n_polls": 1,"created_at": "2017-06-13T13:32:26.000Z","responses": [ { "label": "Ducey", "name": "Doug Ducey", "party": "Republican", "incumbent": true }, { "label": "Farley", "name": "Steve Farley", "party": "Democrat", "incumbent": false }, { "label": "Other", "name": "Other", "party": null, "incumbent": false }, { "label": "Undecided", "name": "Undecided", "party": null,  "incumbent": false }]}

obj.responses.forEach((item, i) => {
        // item is one object from responses
        // i is the index starting at 0. Concat that on the key
        Object.entries(item).forEach(([k, v]) => obj[k+(i+1)] = v)
    })
// no need for obj.responses any more
delete obj.responses
console.log(obj)

昨天我们更新主题时,一切都很好。从那时起,在Chrome上,如果直接通过地址栏访问网站,则视频永远不会加载。但是,如果通过点击任何地方的链接访问同一页面,则视频会完美加载。它只在Chrome上执行此操作。如果你能帮我找到解决办法的话,我真的很感激,因为我有点迷失可能是什么原因。

0 个答案:

没有答案