I have a file path as shown below.The last part (i.e. video2.mp4
) is dynamically changed.I'm using Javascript/Typescript
.
file:///data/user/0/com.sleep.app/files/sleep-videos/video2.mp4
Question: How to get the file:///data/user/0/com.sleep.app/files/sleep-videos/
part only from above string.