Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing asset protocol path #2484

Merged
merged 3 commits into from
Aug 22, 2021
Merged

fix: missing asset protocol path #2484

merged 3 commits into from
Aug 22, 2021

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Aug 18, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@wusyong wusyong requested a review from a team as a code owner August 18, 2021 13:52
@wusyong wusyong requested a review from a team August 18, 2021 13:52
@wusyong
Copy link
Member Author

wusyong commented Aug 18, 2021

Let me do some final check to see if it's not required on mac/linux

@ArturKovacs
Copy link

Is it true that the application code will have to produce asset://localhost/path/to/file on Windows but it must produce asset://path/to/file on every other system? If this is true what's the reasoning behind this distinction?

It seems simpler to just have to specify asset://path/to/file on every platform.

@lucasfernog
Copy link
Member

Windows doesn't support custom protocols yet (such as asset://). That's why we have a convertFileSrc helper API.

@ArturKovacs
Copy link

Sorry I may have been confused about how this should be used. So if I understand it correctly my javascript should look something like this:

let video = new HTMLVideoElement();
video.src = convertFileSrc("C:/path/to/my video.mp4");

@wusyong
Copy link
Member Author

wusyong commented Aug 19, 2021

@ArturKovacs yes.
Btw we are looking into ways for streaming data. So you won't have to get entire binary for the video.

@ArturKovacs
Copy link

Sounds great, thank you!

@lucasfernog lucasfernog merged commit 994b532 into dev Aug 22, 2021
@lucasfernog lucasfernog deleted the fix/asset-path branch August 22, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants