You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

svm.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. function psc(o){
  2. let event = o.args[0]
  3. // if (event. == )
  4. // event.data.push(event.data)
  5. glob_dbg.yt.psl.push(event.data)
  6. clog("yt_s psc",event.data,"~",event.target.getPlayerState(),event.target,event)
  7. if (event.data == YT.PlayerState.PLAYING){
  8. // glob_dbg.yt.unstart ? 0 : clog("yt_s psc","UNSTART 1")
  9. glob_dbg.yt.unstart ? clog("yt_s psc","UNSTART 1") : 0
  10. window.yt_rem1 ? window.yt_rem1() : clog("yt_dbg NO yt_rem1")
  11. glob_dbg.yt.unstart = 0
  12. }
  13. window.ytp_unstart ? ytp_started_check(o.args[0]) : 0
  14. }
  15. glob_dbg.yt = glob_dbg.yt || {psl:[]}
  16. svm_win = {
  17. onYouTubeIframeAPIReady:function (o) {
  18. },
  19. onPlayerStateChange:function (o) {
  20. // clog("xyz",o.args[0])
  21. // clog("yt_0dbg","onPlayerStateChange",o,)
  22. // console.trace("OPSC")
  23. // if ()
  24. psc(o)
  25. // window.ytp_unstart ? ytp_started_check(o.args[0]) : 0
  26. },
  27. onVideoProgress:function (o) {
  28. },
  29. onVolumeChange:function (o) {
  30. },
  31. onPlayerReady:function (o) {
  32. glob_dbg.yt.psl.push("R")
  33. glob_dbg.yt.unstart = 1
  34. },
  35. onPlayerError:function (o) {
  36. },
  37. svm:function (o) {
  38. try {
  39. // clog("svm xyz",this,o)
  40. // clog("yt_0dbg","svm",o.fn_name,o)
  41. this[o.fn_name](o)
  42. }catch (err) {
  43. clog("svm xyz err",err)
  44. }
  45. },
  46. }