-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathdummy.py
35 lines (27 loc) · 886 Bytes
/
dummy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
Dummy Video player plugin.
"""
import re
from xblock.fragment import Fragment
from video_xblock import BaseVideoPlayer
class DummyPlayer(BaseVideoPlayer):
"""
DummyPlayer is a placeholder for cases when appropriate player can't be displayed.
"""
url_re = re.compile(r'')
advanced_fields = ()
def get_frag(self, **context): # pylint: disable=unused-argument
"""
Return a Fragment required to render video player on the client side.
"""
return Fragment('[Here be Video]')
def media_id(self, href): # pylint: disable=unused-argument
"""
Extract Platform's media id from the video url.
"""
return '<media_id>'
def captions_api(self):
"""
Dictionary of url, request parameters, and response structure of video platform's captions API.
"""
return {}