Skip to content

Commit

Permalink
docs: Add FAQ entry for common Vue problem
Browse files Browse the repository at this point in the history
Closes shaka-project#3155

Change-Id: Ia8340796507ce4db37e29bd0d7c729cbb26b1325
  • Loading branch information
theodab committed Sep 30, 2021
1 parent a72adca commit 7c81b0b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/tutorials/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,20 @@ the {@link shaka.extern.ManifestConfiguration|`.manifest.disableVideo`} or
configurations to signal that your content does not have a video or audio
stream.

<hr>

**Q:** How can I make Shaka Player work with Vue?

**A:** Currently, Shaka Player does not support being made into a Vue reactive
object. When Vue wraps an object in a reactive Proxy, it
{@link https://v3.vuejs.org/guide/reactivity.html#proxied-objects|also wraps
nested objects}. This results in Vue converting some of our internal values into
Proxy objects, which causes failures at load-time.
If you want to use Shaka Player in Vue, avoid making it into a reactive object;
so don't declare it using a ref(), and if you put your player instance into a
data() object, you can prefix the property name with "$" or "_" to make Vue not
proxy them.

[386]: https://github.com/google/shaka-player/issues/386#issuecomment-227898001
[489]: https://github.com/google/shaka-player/issues/489#issuecomment-240466224
[743]: https://github.com/google/shaka-player/issues/743
Expand Down

0 comments on commit 7c81b0b

Please sign in to comment.