MCPcopy Index your code
hub / github.com/vidstack/player / _initStore

Method _initStore

packages/vidstack/src/player/player.tsx:204–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202 }
203
204 private _initStore() {
205 const providedProps = {
206 viewType: 'providedViewType',
207 streamType: 'providedStreamType',
208 };
209
210 for (const prop of Object.keys(this.$props)) {
211 this.$store[providedProps[prop] ?? prop]?.set(this.$props[prop]());
212 }
213
214 if (__SERVER__) this._onProvidedTypesChange();
215 else effect(this._onProvidedTypesChange.bind(this));
216
217 this.$store.muted.set(this.$props.muted() || this.$props.volume() === 0);
218 }
219
220 private _watchTitle() {
221 const { title } = this.$props,

Callers 1

constructorMethod · 0.95

Calls 3

mutedMethod · 0.45
volumeMethod · 0.45

Tested by

no test coverage detected