1. 程式人生 > >Uncaught TypeError: Cannot read property 'setAttribute' of null

Uncaught TypeError: Cannot read property 'setAttribute' of null

Uncaught TypeError: Cannot read property 'setAttribute' of null

 

其實就是js中空指標異常

 

h5splayer.js:1 Uncaught TypeError: Cannot read property 'setAttribute' of null
    at new H5sPlayerRTC (h5splayer.js:1)
    at HTMLDocument.<anonymous> (realtime_face_tracking:379)
    at j (jquery-2.1.1.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-2.1.1.min.js:2)
    at Function.ready (jquery-2.1.1.min.js:2)
    at HTMLDocument.I (jquery-2.1.1.min.js:2)

一個原因是介面中沒有 h5video1 的video控制元件。