Method: Baidu::PCS::Client#streaming
- Defined in:
- lib/baidu/pcs/client.rb
#streaming(path, type, &block) ⇒ String
Note:
目前这个接口支持的源文件格式如下:m3u8/m3u/asf/avi/flv/gif/mkv/mov/mp4/m4a/3gp/3g2/mj2/mpeg/ts/rm/rmvb/webm
视频转码
对视频文件进行转码,实现实时观看视频功能。可下载支持HLS/M3U8的媒体云播放器SDK配合使用。
644 645 646 647 648 649 650 651 652 |
# File 'lib/baidu/pcs/client.rb', line 644 def streaming(path, type, &block) path = build_path path query = { path: path, type: type }.update base_query('streaming') if block_given? get "#{BASE_PATH}/file", query, &block else get "#{BASE_PATH}/file", query, raw: true end end |