Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.pptv.com - video or audio doesn't play #10722

Closed
webcompat-bot opened this issue Oct 2, 2017 · 9 comments
Closed

v.pptv.com - video or audio doesn't play #10722

webcompat-bot opened this issue Oct 2, 2017 · 9 comments

Comments

@webcompat-bot
Copy link

URL: http://v.pptv.com/show/icWM9uibBXPnzfXcU.html?rcc_src=B3

Browser / Version: Firefox 58.0
Operating System: Windows 10
Tested Another Browser: Yes

Problem type: Video or audio doesn't play
Description: the video feed does not start
Steps to Reproduce:
I try to watch a Chinese drama fr om the browser, it did work on FF ver. 55, but not work on FF ver56 and FF Nightly built ver.58. I tried it on latest Chrome and it workd.

Screenshot Description

From webcompat.com with ❤️

@MDTsai
Copy link

MDTsai commented Oct 2, 2017

@bli-mozbj could you help to test this issue? I know it needs Flash Player, but I can't play video even if enable Flash player.

@karlcow
Copy link
Member

karlcow commented Oct 4, 2017

capture d ecran 2017-10-04 a 12 43 18

@karlcow
Copy link
Member

karlcow commented Oct 11, 2017

The code sent is different depending on the user agent. For example if you send the Safari iOS user agent it will send a video element with a link (unfortunately HLS).

The player is initialized by
http://player.aplus.pptv.com/jsplayer/pid/5701.js

They try to detect flash

    v = function () {
      try {
        return new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
      } catch (e) {
      }
      try {
        return navigator.plugins['Shockwave Flash']
      } catch (e) {
      }
      return !1
    },

They detect the useragent

  agent = window.navigator.userAgent,
  encode = encodeURIComponent,
  isMobile = !!agent.match(/(iPhone|iPod|Android|iPad|BlackBerry|webOS)/i),

which they use here:

    this.playVideo = function (e) {
      if ('' !== e && void 0 !== e || s.playVideo(), 'number' == type(e) && p.playList[e]) {
        d = e,
        o._willPlay = !0;
        var t = p.playList[d];
        return s || log('player null.'),
        s.playVideo(t)
      }
      'object' == type(e) && o.resetList([e])
    },
    this.checkPlayerType = function (e) {
      return e = + e,
      100000 > e || 950000 > e && e > 300000 ? 'live' : 'vod'
    },
    this.goToAndPlay = function (e, t) {
      var a = + new Date,
      n = t || {
      },
      i = n.ctx && n.ctx.stime > - 1 ? 'live' : this.checkPlayerType(e);
      if (log('当前播放类型 goToAndPlay ===>', i, isMobile, e, n), n.cid = e, mix(n, n.ctx), this.lastTime) {
        if (a - this.lastTime < 1000) return;
        this.lastTime = a
      } else this.lastTime = a;
      if ('live' == i) {
        var r = + new Date / 1000 >> 0,
        l = n.ctx || {
        };
        l.etime && r >= Number(l.etime) && (n.isVod = 1)
      }
      return n.swfUrl ? (this.loadSWF(n.swfUrl), void (n.swfUrl = null))  : void (!s || isMobile ? s = this.create(this.config)  : this.getConfig().playerType != i ? this.switchPlayer(mappid[i], e)  : o.playVideo(n))
    },
    this.switchPlayer = function (e, t) {
      s = null,
      PPTVPlayer = null,
      Loader.load({
        url: l.replace(/\[pid\]/i, e),
        type: 'js',
        userCall: !1,
        callback: function () {
          log('switchPlayer ===> ', e, t),
          o.getVideoData(t)
        }
      })
    },

If they detect flash, they send object and embed.

@karlcow
Copy link
Member

karlcow commented Oct 11, 2017

All of that is done through an iframe.

<iframe id="ifr_player" allowfullscreen="" mozallowfullscreen="" webkitallowfullscreen="" src="http://player.aplus.pptv.com/corporate/proxy/proxy.html#id=12179709&amp;autoplay=0&amp;w=100%25&amp;h=100%25&amp;pageUrl=http%3A%2F%2Fm.pptv.com%2Fshow%2FicWM9uibBXPnzfXcU.html%3Frcc_src%3DB3&amp;pageRefer=&amp;videoType=vod&amp;ctx=complete%3D1%26poster%3Dhttp%253A%252F%252Fv.img.pplive.cn%252F63%252F91%252F63911e4964c579df1a194bc0b25bed56%252F3.jpg%26kk%3D85a666038480a4050fb50bb1cfe60005-d622-59ddcbb4%26o%3Dm.pptv.com%26isVipMovie%3D0%26isSport%3D0%26msiteSourceSite%3D&amp;adConfig=chid%3D10031555%26clid%3D0" scrolling="no" height="100%" frameborder="0" width="100%"></iframe>

@karlcow
Copy link
Member

karlcow commented Oct 11, 2017

Pushing to needscontact and @MDTsai though honestly I don't think they will change anything for NON HLS. Maybe they are preparing for a flashless world and it would be worth to attempt to contact them and encourage them to adopt different formats.

@bli-mozbj
Copy link

We'll try to contact with PPTV, also to see whether they have plans to drop flash.

@bli-mozbj
Copy link

Already fixed and verified on Firefox 56&58
PPTV is still in the process of switching to HTML5 player, but no timeline for the launch yet.

@MDTsai
Copy link

MDTsai commented Oct 19, 2017

Let's close this issue as fixed, thanks for the help of @bli-mozbj

@MDTsai MDTsai closed this as completed Oct 19, 2017
@karlcow karlcow added this to the fixed milestone Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants