How to use the @unimodules/core.SyntheticPlatformEmitter.emit function in @unimodules/core

To help you get started, we’ve selected a few @unimodules/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / packages / expo-sensors / src / ExponentDeviceMotion.web.ts View on Github external
_handleMotion(motion) {
    // TODO: Bacon: Can rotation be calculated?
    SyntheticPlatformEmitter.emit('deviceMotionDidUpdate', {
      acceleration: motion.acceleration,
      accelerationIncludingGravity: motion.accelerationIncludingGravity,
      interval: motion.interval,
      rotationRate: motion.rotationRate,
      orientation: window.orientation,
    });
  },
  startObserving() {
github expo / expo / packages / expo / src / ScreenOrientation / ExpoScreenOrientation.web.ts View on Github external
async function emitOrientationEvent() {
  const [orientationLock, orientationInfo] = await Promise.all([
    getOrientationLockAsync(),
    getOrientationAsync(),
  ]);
  SyntheticPlatformEmitter.emit('expoDidUpdateDimensions', {
    orientationLock,
    orientationInfo,
  });
}
github expo / expo / packages / expo-speech / build / ExponentSpeech.web.js View on Github external
message.onend = (nativeEvent) => {
            SyntheticPlatformEmitter.emit('Exponent.speakingDone', { id, nativeEvent });
        };
        message.onpause = (nativeEvent) => {
github expo / expo / packages / expo-speech / build / ExponentSpeech.web.js View on Github external
message.onstart = (nativeEvent) => {
            SyntheticPlatformEmitter.emit('Exponent.speakingStarted', { id, nativeEvent });
        };
        message.onend = (nativeEvent) => {
github expo / expo / packages / expo-speech / src / Speech / ExponentSpeech.web.ts View on Github external
message.onerror = (nativeEvent: SpeechSynthesisErrorEvent) => {
      SyntheticPlatformEmitter.emit('Exponent.speakingError', { id, nativeEvent });
    };
github expo / expo / packages / expo-speech / src / Speech / ExponentSpeech.web.ts View on Github external
message.onend = (nativeEvent: SpeechSynthesisEvent) => {
      SyntheticPlatformEmitter.emit('Exponent.speakingDone', { id, nativeEvent });
    };
    message.onpause = (nativeEvent: SpeechSynthesisEvent) => {
github expo / expo / packages / expo / build / ScreenOrientation / ExpoScreenOrientation.web.js View on Github external
async function emitOrientationEvent() {
    const [orientationLock, orientationInfo] = await Promise.all([
        getOrientationLockAsync(),
        getOrientationAsync(),
    ]);
    SyntheticPlatformEmitter.emit('expoDidUpdateDimensions', {
        orientationLock,
        orientationInfo,
    });
}
if (canUseEventListeners) {
github expo / expo / packages / expo-speech / build / ExponentSpeech.web.js View on Github external
message.onpause = (nativeEvent) => {
            SyntheticPlatformEmitter.emit('Exponent.speakingStopped', { id, nativeEvent });
        };
        message.onerror = (nativeEvent) => {
github expo / expo / packages / expo-av / src / ExponentAV.web.ts View on Github external
media.ontimeupdate = () => {
      SyntheticPlatformEmitter.emit('didUpdatePlaybackStatus', {
        key: media,
        status: getStatusFromMedia(media),
      });
    };
github expo / expo / packages / expo-speech / src / Speech / ExponentSpeech.web.ts View on Github external
message.onpause = (nativeEvent: SpeechSynthesisEvent) => {
      SyntheticPlatformEmitter.emit('Exponent.speakingStopped', { id, nativeEvent });
    };
    message.onerror = (nativeEvent: SpeechSynthesisErrorEvent) => {