This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from "react"; | |
let scale = 1; | |
const factor = 0.01; | |
const max_scale = 1.425; | |
export const useVideoZoom = () => { | |
const ref = useRef(null); | |
useEffect(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const deepSetPinnedPeer = peerId => | |
setState(prevState => ({ ...prevState, pinnedPeer: peerId })); | |
return ( | |
<AppContext.Provider | |
value={{ | |
setMaxTileCount: deepSetMaxTiles, | |
setSubscribedNotifications: deepSetSubscribedNotifications, | |
setuiViewMode: deepSetuiViewMode, | |
setShowStatsOnTiles: deepSetShowStatsOnTiles, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HMSAudioPluginType } from "@100mslive/react-sdk"; | |
export class AnalyserPlugin { | |
name = "analyser-plugin"; | |
onChange = () => {}; | |
analyserNode = undefined; | |
constructor(onChange) { | |
this.onChange = onChange; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from "react"; | |
import { | |
selectIsPeerVideoEnabled, | |
selectPeers, | |
selectTracksMap, | |
useHMSStore, | |
useHMSVanillaStore, | |
} from "@100mslive/react-sdk"; | |
export const usePeerWithVideo = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const arr = [[1,2,[3]],4]; | |
const flatten = list => list.reduce( | |
(result, val) => result.concat(Array.isArray(val) ? flatten(val) : val), [] | |
); | |
console.log(flatten(arr)); //[1, 2, 3, 4] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.ImageView; | |
/** | |
* Created by Ravi-PC on 04-12-2015. | |
**/ | |
public class AspectImageView extends ImageView { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.widget.RecyclerView; | |
import android.util.SparseBooleanArray; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Created by Ravi-PC on 04-12-2015. | |
**/ | |
public abstract class SelectableAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RectF; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.view.View; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.PorterDuff; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.annotation.ColorRes; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; |