https://www.dendron.so/ logo
#chat
Title
s

SeriousBug

01/27/2022, 4:41 PM
Anything served over HTTP will work, if you spin up a local server that would work too.
s

seadude

01/27/2022, 4:43 PM
(I'm trying to get better about starting threads 🙂 )
Copy code
<video width="640" height="480" controls>
  <source src="E:\dataDocuments\ktree\vault\assets\videos\2022-01-27_BBounty_Example.MOV" type="video/mp4">
</video>
![](E:\dataDocuments\ktree\vault\assets\videos\2022-01-27_BBounty_Example.MOV)
The full path doesn't seem to work
s

SeriousBug

01/27/2022, 4:43 PM
Hmm, I do have one other idea in mind that could work, I'll give it a try and let you know.
s

seadude

01/27/2022, 4:44 PM
Thank you very much!
Hm... it looks like the VSCode-Reveal extension does spin up a server at
http://localhost:64311/#/3
, but no video
s

SeriousBug

01/27/2022, 4:50 PM
Okay nevermind, this will break as soon as Dendron restarts. If you set
src="http://localhost:xxxxx/api/assets?fpath=E:%2FdataDocuments%2Fktree%2Fvault%2Fassets%2Fvideos%2F2022-01-27)BBounty_Example.MOV&ws=E:%2FdataDocuments%2Fktree"
, where the
xxxxx
is the port used by the Dendron engine, it would work for a bit but crash once Dendron is restarted and the port changes 😅
s

seadude

01/27/2022, 4:52 PM
Hm... that may work in my case. Its like a self-destruct mechanism for the video in the presentation!
s

SeriousBug

01/27/2022, 4:54 PM
You could also spin up a local server like
python3 -m http.server 8080
, then point
src
at that. The problem is that VSCode preview won't let us just access those files because that would be unsafe. We work around it by accessing images through the Dendron engine, but Dendron doesn't know about the video so it can't fix the src to point at the engine.
s

seadude

01/27/2022, 4:56 PM
hm...
I couldnt get the first example to work
src="http://localhost:64311/api/assets?fpath=E:%2FdataDocuments%2Fktree%2Fvault%2Fassets%2Fvideos%2F2022-01-27)BBounty_Example.MOV&ws=E:%2FdataDocuments%2Fktree"
Same issue, blank video player in the browser after a refresh
I'll try the other method
With the
python3
server, do I need the extra stuff in the URL ? (Last part
BBounty_Example.MOV&ws=E:%2FdataDocuments%2Fktree
)
And the
api/assets?fpath=
?
s

SeriousBug

01/27/2022, 5:02 PM
No, just whatever the URL is to view in the browser. The preview (and VSCode in general) is just Chrome in a box 😄
s

seadude

01/27/2022, 5:03 PM
Got it! Here goes!
Wahoo! That works!
With the
python
server spun up, the exported vscode-reveal presentation shows the vieoplayer AND the video using:
Copy code
<video width="640" height="480" controls>
  <source src="http://localhost:8080/ktree/vault/assets/videos/2022-01-27_BBounty_Example.MOV" type="video/mp4">
</video>
I wonder... If I have the temp server stood up, can someone see the content by visiting
http://<my_ip>:8080
?
s

SeriousBug

01/27/2022, 7:43 PM
Do you have a firewall set up? If so, then no. If you don't have a firewall but have NAT (which you most likely do), then only devices on the same network can. You can also ask python to not serve the video outside of your machine with
python3 -m http.server -b 127.0.0.1 8080
Any program on your computer will be able to access it though, you can't really prevent that I don't think.
s

seadude

01/27/2022, 7:46 PM
Thank you for that information. I like the idea of having python serve up the content for only my local machine.
I might try hosting in S3 or Azure blog storage and see if I can link to it from the presentation.
Just for fun. Have a great day!
(PS: I totally delivered the presentation ~45mins with your help. What a community Dendron brings together!)
Oh yeah...sweet! Hosting the image in Azure Blob Storage, generating a SAS token URL, then placing the URL in the presentation worked great. Setting a time limit for the URL to be active was nice too.
3 Views