Skip to content

Commit b559b3c

Browse files
committed
add nbVideo & nbAudio to all_blocks.nim
1 parent 36d5595 commit b559b3c

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

docs/media/bad_apple!!.mp4

7.46 MB
Binary file not shown.

docs/media/bad_apple!!.webm

1.22 MB
Binary file not shown.

docsrc/allblocks.nim

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,28 @@ Most formats (.jpg, .png) are accepted. The caption is optional!
108108
nimibCode:
109109
nbImage(url="images/todd-cravens-nimib-unsplash.jpg", caption="Blue Whale (photograph by Todd Cravens)")
110110

111+
nbCodeBlock: "nbVideo"
112+
nbText: """
113+
`nbVideo` allows you to display videos within your nimib document. You may choose if the
114+
video autoplays, loops, and/or is muted.
115+
116+
The `typ` parameter specifies the video's MIME type, and is optional!
117+
"""
118+
119+
nimibCode:
120+
nbVideo(url="media/bad_apple!!.mp4", typ="video/mp4")
121+
122+
nbCodeBlock: "nbAudio"
123+
nbText: """
124+
`nbAudio` enables you to play audio in nimib. You may choose if the audio autoplays,
125+
loops, and/or is muted.
126+
127+
The `typ` parameter is similar to `nbVideo`'s.
128+
"""
129+
130+
nimibCode:
131+
nbAudio(url="media/bad_apple!!.webm", loop=true)
132+
111133
nbCodeBlock: "nbFile"
112134
nbText: """
113135
`nbFile` can save the contents of block into a file or display the contents of a file.

0 commit comments

Comments
 (0)