@vidstack/react
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -94,7 +94,12 @@ // src/components.ts | ||
useEffect3(() => { | ||
if (!isUndefined(target)) { | ||
const hasTarget = !isUndefined(target); | ||
if (hasTarget) { | ||
remote.setTarget(target && "current" in target ? target.current : target); | ||
} else if (context) { | ||
remote.setTarget(context.$element()); | ||
} | ||
if (context) { | ||
const media = context.$element(); | ||
if (!hasTarget) | ||
remote.setTarget(media); | ||
remote.setMedia(media); | ||
} | ||
return () => remote.setTarget(null); | ||
@@ -101,0 +106,0 @@ }, [target]); |
@@ -94,7 +94,12 @@ // src/components.ts | ||
useEffect3(() => { | ||
if (!isUndefined(target)) { | ||
const hasTarget = !isUndefined(target); | ||
if (hasTarget) { | ||
remote.setTarget(target && "current" in target ? target.current : target); | ||
} else if (context) { | ||
remote.setTarget(context.$element()); | ||
} | ||
if (context) { | ||
const media = context.$element(); | ||
if (!hasTarget) | ||
remote.setTarget(media); | ||
remote.setMedia(media); | ||
} | ||
return () => remote.setTarget(null); | ||
@@ -101,0 +106,0 @@ }, [target]); |
@@ -94,7 +94,12 @@ // src/components.ts | ||
useEffect3(() => { | ||
if (!isUndefined(target)) { | ||
const hasTarget = !isUndefined(target); | ||
if (hasTarget) { | ||
remote.setTarget(target && "current" in target ? target.current : target); | ||
} else if (context) { | ||
remote.setTarget(context.$element()); | ||
} | ||
if (context) { | ||
const media = context.$element(); | ||
if (!hasTarget) | ||
remote.setTarget(media); | ||
remote.setMedia(media); | ||
} | ||
return () => remote.setTarget(null); | ||
@@ -101,0 +106,0 @@ }, [target]); |
{ | ||
"name": "@vidstack/react", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Build awesome media experiences on the web.", | ||
@@ -25,9 +25,9 @@ "license": "MIT", | ||
"@types/react": "^18.0.0", | ||
"maverick.js": "^0.31.2", | ||
"maverick.js": "^0.32.0", | ||
"react": "^18.0.0", | ||
"vidstack": "0.1.3" | ||
"vidstack": "0.1.4" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.0", | ||
"maverick.js": "^0.31.2", | ||
"maverick.js": "^0.32.0", | ||
"react": "^18.0.0", | ||
@@ -34,0 +34,0 @@ "rimraf": "^3.0.0", |
Sorry, the diff of this file is not supported yet
39467
1001