hipy/drpy_js/直播转点播[合].js

1 line
25 KiB
JavaScript
Raw Normal View History

2024-11-19 10:16:36 +02:00
LyoqCiAqIOaUr+aMgeacrOWcsOWMheebtOaSremTvuaOpQogKiDkvKDlj4IgP3R5cGU9dXJsJnBhcmFtcz0uLi9qc29uL2xpdmUyY21zLmpzb24KIGxpdmUyY21zLmpzb24KIOaUr+aMgW0zdeexu+ebtOaSre+8jOaUr+aMgee6v+i3r+W9kuW5tuOAguaUr+aMgeetm+mAieWIh+aNouaYvuekuuaooeW8jwogWwogewogICAgIm5hbWUiOiAiR2l0SHViIiwKICAgICJ1cmwiOiAiaHR0cHM6Ly9naHByb3h5Lm5ldC9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vc3NpbGkxMjYvdHYvbWFpbi9pdHZsaXN0LnR4dCIKICB9LAogewogICAgIm5hbWUiOiAiQ05UViIsCiAgICAidXJsIjogIi4vbGl2ZV9jbnR2LnR4dCIKICB9CiBdCiAqLwoKLyoqCiAqIG0zdeebtOaSreagvOW8j+i9rOS4gOiIrOebtOaSreagvOW8jwogKiBAcGFyYW0gbTN1CiAqIEByZXR1cm5zIHtzdHJpbmd9CiAqLwpmdW5jdGlvbiBjb252ZXJ0TTN1VG9Ob3JtYWwobTN1KSB7CiAgICB0cnkgewogICAgICAgIGNvbnN0IGxpbmVzID0gbTN1LnNwbGl0KCdcbicpOwogICAgICAgIGxldCByZXN1bHQgPSAnJzsKICAgICAgICBsZXQgVFYgPSAnJzsKICAgICAgICAvLyBsZXQgZmxhZz0nI2dlbnJlIyc7CiAgICAgICAgbGV0IGZsYWcgPSAnI20zdSMnOwogICAgICAgIGxldCBjdXJyZW50R3JvdXBUaXRsZSA9ICcnOwogICAgICAgIGxpbmVzLmZvckVhY2goKGxpbmUpID0+IHsKICAgICAgICAgICAgaWYgKGxpbmUuc3RhcnRzV2l0aCgnI0VYVElORjonKSkgewogICAgICAgICAgICAgICAgbGluZSA9IGxpbmUucmVwbGFjZSgvJy9nLCAnIicpOwogICAgICAgICAgICAgICAgbGV0IGdyb3VwVGl0bGUgPSAn5pyq55+l6aKR6YGTJzsKICAgICAgICAgICAgICAgIGxldCB0dmdfbmFtZSA9ICcnOwogICAgICAgICAgICAgICAgbGV0IHR2Z19sb2dvID0gJyc7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGdyb3VwVGl0bGUgPSBsaW5lLm1hdGNoKC9ncm91cC10aXRsZT0iKC4qPykiLylbMV0udHJpbSgpOwogICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICB0dmdfbmFtZSA9IGxpbmUubWF0Y2goL3R2Zy1uYW1lPSIoLio/KSIvKVsxXS50cmltKCk7CiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHR2Z19sb2dvID0gbGluZS5tYXRjaCgvdHZnLWxvZ289IiguKj8pIi8pWzFdLnRyaW0oKTsKICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIFRWID0gbGluZS5zcGxpdCgnLCcpLnNsaWNlKC0xKVswXS50cmltKCk7CiAgICAgICAgICAgICAgICBpZiAoY3VycmVudEdyb3VwVGl0bGUgIT09IGdyb3VwVGl0bGUpIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50R3JvdXBUaXRsZSA9IGdyb3VwVGl0bGU7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJldF9saXN0ID0gW2N1cnJlbnRHcm91cFRpdGxlLCBmbGFnXTsKICAgICAgICAgICAgICAgICAgICAvLyBpZih0dmdfbmFtZSl7CiAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldF9saXN0LnB1c2godHZnX25hbWUpOwogICAgICAgICAgICAgICAgICAgIC8vIH0KICAgICAgICAgICAgICAgICAgICAvLyBpZih0dmdfbG9nbyl7CiAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldF9saXN0LnB1c2godHZnX2xvZ28pOwogICAgICAgICAgICAgICAgICAgIC8vIH0KICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gYFxuJHtyZXRfbGlzdC5qb2luKCIsIil9XG5gOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgaWYgKGxpbmUuc3RhcnRzV2l0aCgnaHR0cCcpKSB7CiAgICAgICAgICAgICAgICBjb25zdCBzcGxpdExpbmUgPSBsaW5lLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICByZXN1bHQgKz0gYCR7VFZ9XCwke3NwbGl0TGluZVswXX1cbmA7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgICAgICAvLyByZXN1bHQgPSByZXN1bHQudHJpbSgpOwogICAgICAgIHJlc3VsdCA9IG1lcmdlQ2hhbm5lbHMocmVzdWx0KTsKICAgICAgICAvLyBsb2cocmVzdWx0KTsKICAgICAgICByZXR1cm4gcmVzdWx0CiAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgbG9nKGBtM3Xnm7Tmkq3ovazmma7pgJrnm7Tmkq3lj5HnlJ/plJnor686JHtlLm1lc3NhZ2V9YCk7CiAgICAgICAgcmV0dXJuIG0zdQogICAgfQp9CgovKioKICog57q/6Lev5b2S57G7L+Wwj+ajieiihOeul+azlQogKiBAcGFyYW0gYXJyIOaVsOe7hAogKiBAcGFyYW0gcGFyc2Ug6Kej5p6Q5byPCiAqIEByZXR1cm5zIHtbWypdXX0KICovCmZ1bmN0aW9uIHNwbGl0QXJyYXkoYXJyLCBwYXJzZSkgewogICAgcGFyc2UgPSBwYXJzZSAmJiB0eXBlb2YgKHBhcnNlKSA9PSAnZnVuY3Rpb24nID8gcGFyc2UgOiAnJzsKICAgIGxldCByZXN1bHQgPSBbW2FyclswXV1dOwogICAgZm9yIChsZXQgaSA9IDE7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsKICAgICAgICBsZXQgaW5kZXggPSAtMTsKICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJlc3VsdC5sZW5ndGg7IGorKykgewogICAgICAgICAgICBpZiAocGFyc2UgJiYgcmVzdWx0W2pdLm1hcChwYXJzZSkuaW5jbHVkZXMocGFyc2UoYXJyW2ldKSkpIHsKICAgICAgICAgICAgICAgIGluZGV4ID0gajsKICAgICAgICAgICAgfSBlbHNlIGlmICgoIXBhcnNlKSAmJiByZXN1bHRbal0uaW5jbHVkZXMoYXJyW2ldKSkgewogICAgICAgICAgICAgICAgaW5kZXggPSBqOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChpbmRleCA+PSByZXN1bHQubGVuZ3RoIC0gMSkgewogICAgICAgICAgICByZXN1bHQucHVzaChbXSk7CiAgICAgICAgICAgIHJlc3VsdFtyZXN1bHQubGVuZ3RoIC0gMV0ucHVzaChhcnJbaV0pOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHJlc3VsdFtpbmRleCArIDFdLnB1c2goYXJyW2ldKTsKICAgICAgICB9CiAgICB9CiA