Git Product home page Git Product logo

Comments (11)

zhongwuzw avatar zhongwuzw commented on May 14, 2024 1

@790587047 我提交了PR, 我验证了一下,默认的UIWebViewWKWebView都无法播放视频,mobile safari可以,所以我模拟了safari的User-Agent. 原因应该是百度判断User-Agent的时候出现了误判,不修改的话会通过iframe出发调用百度盒子,导致播放不了。

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

@zhongwuzw 好的,谢谢作者,我这边改了下确实是可以了,想问下这个排查思路是什么呢?确实是只有百度的有问题,其他平台的视频的都是没问题的,但是safari又可以的,所以比较尴尬。

from webbrowser.

zhongwuzw avatar zhongwuzw commented on May 14, 2024

@790587047 排查思路是首先最小化复现步骤,如去掉所有逻辑操作,单独测试UIWebViewWKWebView, 原生空间是否存在问题,如果存在问题,判断Mobile Safari是否存在问题,不存在,基本定位为User-Agent的问题,因为识别Client只能通过User-Agent,接下来就是使用UIWeiView来调试百度网页,可以看到点击播放视频时,js会使用iframe来触发百度全家桶。

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

@zhongwuzw 好的,谢谢。还有个问题想请教下,也是测试视频的时候发现的,https://videojs.com (需要翻墙) 这个网站顶部的视频,点开后拉到结束,然后结束后再点开,重复几次就会闪退,目前测试到的就是这种使用系统自带的播放的就会,还在测别的网站,报的堆栈信息是这个,是系统的内部的错误,有什么排查思路可以解决这种情况的

  • thread #11, name = 'WebThread', stop reason = EXC_BAD_ACCESS (code=1, address=0x7d26c00100000050)
    • frame #0: 0x00000001dfade38c WebCoreWebCore::PlaybackSessionModelMediaElement::updateForEventName(WTF::AtomicString const&) + 680 frame #1: 0x00000001e0419c28 WebCoreWebCore::EventTarget::fireEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraitsWebCore::RegisteredEventListener >, 1ul, WTF::CrashOnOverflow, 16ul>) + 736
      frame #2: 0x00000001e0417548 WebCoreWebCore::EventTarget::fireEventListeners(WebCore::Event&) + 260 frame #3: 0x00000001e0414460 WebCoreWebCore::dispatchEventInDOM(WebCore::Event&, WebCore::EventPath const&) + 152
      frame #4: 0x00000001e0414128 WebCoreWebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) + 700 frame #5: 0x00000001e05c9d90 WebCoreWebCore::HTMLMediaElement::dispatchEvent(WebCore::Event&) + 192
      frame #6: 0x00000001e041c780 WebCoreWebCore::GenericEventQueue::dispatchOneEvent() + 168 frame #7: 0x00000001e08cb918 WebCoreWebCore::TaskDispatcherWebCore::Timer::sharedTimerFired() + 204
      frame #8: 0x00000001e08e8ec0 WebCoreWebCore::ThreadTimers::sharedTimerFiredInternal() + 352 frame #9: 0x00000001e092d7ac WebCoreWebCore::timerFired(__CFRunLoopTimer*, void*) + 28
      frame #10: 0x00000001d6e32bf0 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28 frame #11: 0x00000001d6e32920 CoreFoundation__CFRunLoopDoTimer + 864
      frame #12: 0x00000001d6e32154 CoreFoundation__CFRunLoopDoTimers + 248 frame #13: 0x00000001d6e2d030 CoreFoundation__CFRunLoopRun + 1880
      frame #14: 0x00000001d6e2c5b8 CoreFoundationCFRunLoopRunSpecific + 436 frame #15: 0x00000001dfc53ba4 WebCoreRunWebThread(void*) + 592
      frame #16: 0x00000001d6abd2fc libsystem_pthread.dylib_pthread_body + 128 frame #17: 0x00000001d6abd25c libsystem_pthread.dylib_pthread_start + 48
      frame #18: 0x00000001d6ac0d08 libsystem_pthread.dylib`thread_start + 4

from webbrowser.

zhongwuzw avatar zhongwuzw commented on May 14, 2024

从回溯栈来看,是WebKit的bug,而且我理解EXC_BAD_ACCESS 这种基本是无解的。你这边可以提交Radar,我建议维持现状。

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

@zhongwuzw safari应该也是用的webkit内核的吧,safari试了好多次,都是不会的,自己重新开个项目写一个最简单的webview还是会,UA的safari版本也是改的最新的,所以比较尴尬。

from webbrowser.

zhongwuzw avatar zhongwuzw commented on May 14, 2024

@790587047 我这边在iOS12模拟器上试了一下没有复现,点击播放视频之后会进入全屏模式,然后来回播放?

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

@zhongwuzw 点击视频之后进入全屏,然后手动拉到结束或者自动结束,然后关闭全屏,关闭之后再点重新播放,次数不定,就会复现,不止那个网站了,今天试了腾讯的也会

from webbrowser.

zhongwuzw avatar zhongwuzw commented on May 14, 2024

@790587047 WKWebView有问题么?WKWebView使用了多进程模式,渲染进程并不和UIWebView一样,UIWebView是单进程的,和用户进程一起,所以WebCore Crash没有什么办法。

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

@zhongwuzw WKWebView还真没问题~那这个只能换wk才能解决或者说这个如果要扣视频链接出来原生播放怎么阻止原先的web的视频播放,用urlprotocol没办法阻止事件、好僵硬,基本上播视频的都可能存在这个问题。

from webbrowser.

bk97531 avatar bk97531 commented on May 14, 2024

还有个,就是基本上是12系统的,之前的系统基本没测出来

from webbrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.