Merge branch 'release/v1.7.0' of https://github.com/mitchemmc/owlbear-rodeo into release/v1.7.0
This commit is contained in:
commit
489778c6b8
@ -1,5 +1,5 @@
|
|||||||
REACT_APP_BROKER_URL=https://test.owlbear.rodeo
|
REACT_APP_BROKER_URL=https://connect.owlbear.rodeo
|
||||||
REACT_APP_ICE_SERVERS_URL=https://test.owlbear.rodeo/iceservers
|
REACT_APP_ICE_SERVERS_URL=https://connect.owlbear.rodeo/iceservers
|
||||||
REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51
|
REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51
|
||||||
REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo
|
REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo
|
||||||
REACT_APP_VERSION=$npm_package_version
|
REACT_APP_VERSION=$npm_package_version
|
||||||
|
7
src/docs/faq/connection.md
Normal file
7
src/docs/faq/connection.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
## Connection
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### WebRTC not supported.
|
||||||
|
|
||||||
|
If you see a WebRTC not supported message ensure you are using a browser that supports [WebRTC](https://caniuse.com/rtcpeerconnection) and also ensure that you don't have an extension that is blocking WebRTC connections. Some VPN extensions can cause this.
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
This could be because it’s taking a while to upload. Ensure that your players can see a loading bar at the top of the site. Owlbear Rodeo will do its best to load a lower quality map, before continuing to load in higher quality. See 'How big can my maps be?' in our faqs.
|
This could be because it’s taking a while to upload. Ensure that your players can see a loading bar at the top of the site. Owlbear Rodeo will do its best to load a lower quality map, before continuing to load in higher quality. See 'How big can my maps be?' in our faqs.
|
||||||
|
|
||||||
If your players do not see a loading bar at the top of their screen ensure that you don't have an extension that is blocking WebRTC connections. Some VPN extensions can causes this.
|
If your players do not see a loading bar at the top of their screen ensure that you don't have an extension that is blocking WebRTC connections. Some VPN extensions can cause this.
|
||||||
|
|
||||||
### Why do some of my tokens have a question mark on them?
|
### Why do some of my tokens have a question mark on them?
|
||||||
|
|
||||||
|
@ -56,6 +56,10 @@ In this update the fog tool has been changed to hopefully help work better with
|
|||||||
- Fixed a bug causing the colour of the glass and gemstone dice to be wrong.
|
- Fixed a bug causing the colour of the glass and gemstone dice to be wrong.
|
||||||
- Fixed a bug that would cause custom tokens to not load until a refresh.
|
- Fixed a bug that would cause custom tokens to not load until a refresh.
|
||||||
|
|
||||||
|
[Reddit](https://www.reddit.com/r/OwlbearRodeo/comments/l15n7n/beta_v170_release_notes_fog_enhancements/)
|
||||||
|
[Twitter](https://twitter.com/OwlbearRodeo/status/1351819654113554434)
|
||||||
|
[Patreon](https://www.patreon.com/posts/v1-7-0-released-46437122)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Jan 20 2021
|
Jan 20 2021
|
||||||
|
@ -208,6 +208,9 @@ export function drawActionsToShapes(actions, actionIndex) {
|
|||||||
let shapesById = {};
|
let shapesById = {};
|
||||||
for (let i = 0; i <= actionIndex; i++) {
|
for (let i = 0; i <= actionIndex; i++) {
|
||||||
const action = actions[i];
|
const action = actions[i];
|
||||||
|
if (!action) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (action.type === "add" || action.type === "edit") {
|
if (action.type === "add" || action.type === "edit") {
|
||||||
for (let shape of action.shapes) {
|
for (let shape of action.shapes) {
|
||||||
shapesById[shape.id] = shape;
|
shapesById[shape.id] = shape;
|
||||||
|
@ -88,7 +88,7 @@ function useNetworkedState(
|
|||||||
|
|
||||||
function handleSocketUpdateEvent(update) {
|
function handleSocketUpdateEvent(update) {
|
||||||
_setState((prevState) => {
|
_setState((prevState) => {
|
||||||
if (prevState[partialUpdatesKey] === update.id) {
|
if (prevState && prevState[partialUpdatesKey] === update.id) {
|
||||||
let newState = { ...prevState };
|
let newState = { ...prevState };
|
||||||
applyChanges(newState, update.changes);
|
applyChanges(newState, update.changes);
|
||||||
lastSyncedStateRef.current = newState;
|
lastSyncedStateRef.current = newState;
|
||||||
|
@ -25,6 +25,7 @@ if (process.env.REACT_APP_LOGGING === "true") {
|
|||||||
"QuotaExceededError",
|
"QuotaExceededError",
|
||||||
"XDR encoding failure",
|
"XDR encoding failure",
|
||||||
"Assertion failed: Input argument is not an HTMLInputElement",
|
"Assertion failed: Input argument is not an HTMLInputElement",
|
||||||
|
"ERR_WEBRTC_SUPPORT",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
"mapId"
|
"mapId"
|
||||||
);
|
);
|
||||||
const [assetManifest, setAssetManifest] = useNetworkedState(
|
const [assetManifest, setAssetManifest] = useNetworkedState(
|
||||||
[],
|
null,
|
||||||
session,
|
session,
|
||||||
"manifest",
|
"manifest",
|
||||||
100,
|
100,
|
||||||
@ -94,15 +94,17 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
|
|
||||||
function addAssetIfNeeded(asset) {
|
function addAssetIfNeeded(asset) {
|
||||||
// Asset needs updating
|
// Asset needs updating
|
||||||
const exists = assetManifest.some((oldAsset) =>
|
const exists = assetManifest?.some((oldAsset) =>
|
||||||
compareAssets(oldAsset, asset)
|
compareAssets(oldAsset, asset)
|
||||||
);
|
);
|
||||||
const needsUpdate = assetManifest.some((oldAsset) =>
|
const needsUpdate = assetManifest?.some((oldAsset) =>
|
||||||
assetNeedsUpdate(oldAsset, asset)
|
assetNeedsUpdate(oldAsset, asset)
|
||||||
);
|
);
|
||||||
if (!exists || needsUpdate) {
|
if (!exists || needsUpdate) {
|
||||||
setAssetManifest((prevAssets) => [
|
setAssetManifest((prevAssets) => [
|
||||||
...prevAssets.filter((prevAsset) => !compareAssets(prevAsset, asset)),
|
...(prevAssets || []).filter(
|
||||||
|
(prevAsset) => !compareAssets(prevAsset, asset)
|
||||||
|
),
|
||||||
asset,
|
asset,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -273,6 +275,9 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async function handleMapTokenStateCreate(tokenState) {
|
async function handleMapTokenStateCreate(tokenState) {
|
||||||
|
if (!currentMap || !currentMapState) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// If file type token send the token to the other peers
|
// If file type token send the token to the other peers
|
||||||
const token = getToken(tokenState.tokenId);
|
const token = getToken(tokenState.tokenId);
|
||||||
if (token && token.type === "file") {
|
if (token && token.type === "file") {
|
||||||
@ -283,7 +288,7 @@ function NetworkedMapAndTokens({ session }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleMapTokenStateChange(change) {
|
function handleMapTokenStateChange(change) {
|
||||||
if (currentMapState === null) {
|
if (!currentMapState) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setCurrentMapState((prevMapState) => ({
|
setCurrentMapState((prevMapState) => ({
|
||||||
|
@ -119,7 +119,9 @@ class Session extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
sendTo(sessionId, eventId, data, channel) {
|
sendTo(sessionId, eventId, data, channel) {
|
||||||
if (!(sessionId in this.peers)) {
|
if (!(sessionId in this.peers)) {
|
||||||
this._addPeer(sessionId, true);
|
if (!this._addPeer(sessionId, true)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.peers[sessionId].ready) {
|
if (!this.peers[sessionId].ready) {
|
||||||
@ -146,7 +148,9 @@ class Session extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
startStreamTo(sessionId, track, stream) {
|
startStreamTo(sessionId, track, stream) {
|
||||||
if (!(sessionId in this.peers)) {
|
if (!(sessionId in this.peers)) {
|
||||||
this._addPeer(sessionId, true);
|
if (!this._addPeer(sessionId, true)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.peers[sessionId].ready) {
|
if (!this.peers[sessionId].ready) {
|
||||||
@ -192,6 +196,12 @@ class Session extends EventEmitter {
|
|||||||
this.socket.emit("join_game", gameId, password);
|
this.socket.emit("join_game", gameId, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new peer connection
|
||||||
|
* @param {string} id
|
||||||
|
* @param {boolean} initiator
|
||||||
|
* @returns {boolean} True if peer was added successfully
|
||||||
|
*/
|
||||||
_addPeer(id, initiator) {
|
_addPeer(id, initiator) {
|
||||||
try {
|
try {
|
||||||
const connection = new Connection({
|
const connection = new Connection({
|
||||||
@ -322,13 +332,15 @@ class Session extends EventEmitter {
|
|||||||
peer.connection.on("error", handleError.bind(this));
|
peer.connection.on("error", handleError.bind(this));
|
||||||
|
|
||||||
this.peers[id] = peer;
|
this.peers[id] = peer;
|
||||||
|
|
||||||
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
this.emit("peerError", { error });
|
this.emit("peerError", { error });
|
||||||
this.emit("disconnected");
|
|
||||||
for (let peer of Object.values(this.peers)) {
|
for (let peer of Object.values(this.peers)) {
|
||||||
peer.connection && peer.connection.destroy();
|
peer.connection && peer.connection.destroy();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,7 +386,9 @@ class Session extends EventEmitter {
|
|||||||
_handleSignal(data) {
|
_handleSignal(data) {
|
||||||
const { from, signal } = data;
|
const { from, signal } = data;
|
||||||
if (!(from in this.peers)) {
|
if (!(from in this.peers)) {
|
||||||
this._addPeer(from, false);
|
if (!this._addPeer(from, false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.peers[from].connection.signal(signal);
|
this.peers[from].connection.signal(signal);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ const database = raw("../docs/faq/database.md");
|
|||||||
const maps = raw("../docs/faq/maps.md");
|
const maps = raw("../docs/faq/maps.md");
|
||||||
const audioSharing = raw("../docs/faq/audio-sharing.md");
|
const audioSharing = raw("../docs/faq/audio-sharing.md");
|
||||||
const general = raw("../docs/faq/general.md");
|
const general = raw("../docs/faq/general.md");
|
||||||
|
const connection = raw("../docs/faq/connection.md");
|
||||||
|
|
||||||
function FAQ() {
|
function FAQ() {
|
||||||
return (
|
return (
|
||||||
@ -45,6 +46,9 @@ function FAQ() {
|
|||||||
<Box my={1} id="database">
|
<Box my={1} id="database">
|
||||||
<Markdown source={database} assets={assets} />
|
<Markdown source={database} assets={assets} />
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box my={1} id="connection">
|
||||||
|
<Markdown source={connection} assets={assets} />
|
||||||
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Footer />
|
<Footer />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -66,9 +66,9 @@ function Game() {
|
|||||||
setPeerError("Unable to connect to party.");
|
setPeerError("Unable to connect to party.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
session.on("error", handlePeerError);
|
session.on("peerError", handlePeerError);
|
||||||
return () => {
|
return () => {
|
||||||
session.off("error", handlePeerError);
|
session.off("peerError", handlePeerError);
|
||||||
};
|
};
|
||||||
}, [session]);
|
}, [session]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user