Skip to content

Commit 9981afa

Browse files
committed
added docs and type check to MediaSource component
1 parent 7cfc5bb commit 9981afa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

webexteamssdk/cards/components.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,23 @@
2323
"""
2424

2525
from .abstract_components import Serializable
26+
from .utils import check_type
2627

2728
class MediaSource(Serializable):
29+
"""Defines the source of a Media element."""
2830
def __init__(self,
2931
mimeType,
3032
url):
33+
"""Create a new MediaSource
34+
35+
Args:
36+
mimeType(str): Mime type of the associated media(i.e. 'video/mp4')
37+
url(str): URL of the media.
38+
"""
39+
# Check types
40+
check_type(mimeType, str, False, False)
41+
check_type(url, str, False, False)
42+
3143
self.mimeType = mimeType
3244
self.url = url
3345

0 commit comments

Comments
 (0)