Screenshot of video element using phantomjs

前端 未结 2 1656
耶瑟儿~
耶瑟儿~ 2021-01-27 18:07

I am trying to take a screenshot of page with a video element using phantomjs. Currently, i set the time of the video ahead to some desired seconds (i.e. 60). Then I use page.re

相关标签:
2条回答
  • 2021-01-27 18:47

    Analogous to Cybermaxs' answer, here are the features of PhantomJS 2:

    Detected features (using Modernizr 2.8.3):
    
    Supported:
      flexbox
      flexboxlegacy
      canvas
      canvastext
      touch
      postmessage
      websqldatabase
      indexeddb
      hashchange
      history
      draganddrop
      websockets
      rgba
      hsla
      multiplebgs
      backgroundsize
      borderimage
      borderradius
      boxshadow
      textshadow
      opacity
      cssanimations
      csscolumns
      cssgradients
      cssreflections
      csstransforms
      csstransitions
      fontface
      generatedcontent
      localstorage
      sessionstorage
      webworkers
      applicationcache
      svg
      inlinesvg
      smil
      svgclippaths
    
    Not supported:
      webgl
      geolocation
      csstransforms3d
      video
      audio
    
    0 讨论(0)
  • 2021-01-27 19:03

    Running the features.js example (using modernizr.js), you will see

    >phantomjs.exe examples\features.js
    Detected features (using Modernizr 2.0.6):
    
    Supported:
      touch
      generatedcontent
      fontface
      flexbox
      canvas
      canvastext
      postmessage
      websqldatabase
      hashchange
      history
      draganddrop
      websockets
      rgba
      hsla
      multiplebgs
      backgroundsize
      borderimage
      borderradius
      boxshadow
      textshadow
      opacity
      cssanimations
      csscolumns
      cssgradients
      cssreflections
      csstransforms
      csstransitions
      localstorage
      sessionstorage
      webworkers
      applicationcache
      svg
      inlinesvg
      smil
      svgclippaths
    
    Not supported:
      csstransforms3d
      webgl
      geolocation
      indexeddb
      video
      audio
    

    So, yes, video is not supported.

    0 讨论(0)
提交回复
热议问题