-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideo.py
More file actions
22 lines (19 loc) · 833 Bytes
/
video.py
File metadata and controls
22 lines (19 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from slack_sdk.models.blocks import VideoBlock
from slack_sdk.models.blocks.basic_components import PlainTextObject
def example01() -> VideoBlock:
"""
Displays an embedded video player.
https://docs.slack.dev/reference/block-kit/blocks/video-block/
A video block.
"""
block = VideoBlock(
title=PlainTextObject(
text="Use the Events API to create a dynamic App Home", emoji=True
),
title_url="https://www.youtube.com/watch?v=8876OZV_Yy0",
description=PlainTextObject(text="Slack sure is nifty!", emoji=True),
video_url="https://www.youtube.com/embed/8876OZV_Yy0?feature=oembed&autoplay=1",
alt_text="Use the Events API to create a dynamic App Home",
thumbnail_url="https://i.ytimg.com/vi/8876OZV_Yy0/hqdefault.jpg",
)
return block