1234567891011121314151617181920212223242526272829303132333435363738 |
- import Vue from "vue";
- import App from "./App.vue";
- import router from "./router";
- import store from "./store";
- import api from './util/api.js'
- import moment from 'moment';
- import {VueJsonp} from 'vue-jsonp';
- import OSS from 'ali-oss';
- import Vant from 'vant';
- import 'vant/lib/index.css';
- import {IMSDKCode} from './util/index.js';
- import TIM from 'tim-js-sdk';
- import Recorder from 'js-audio-recorder';
- Vue.use(Vant);
- Vue.use(VueJsonp)
- Vue.prototype.$recorder=new Recorder({
- sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
- sampleRate: 16000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
- numChannels: 1, // 声道,支持 1 或 2, 默认是1
- });;
- Vue.prototype.$store=store;
- Vue.prototype.$api=api;
- Vue.prototype.$moment=moment;
- Vue.prototype.$oss=OSS;
- Vue.prototype.$EventBus = new Vue();
- Vue.config.productionTip = false;
- Vue.prototype.$TUIKit = TIM.create({
- SDKAppID: IMSDKCode
- });
- Vue.prototype.$TUIKitTIM = TIM;
- Vue.prototype.$TUIKitEvent = TIM.EVENT;
- Vue.prototype.$TUIKitVersion = TIM.VERSION;
- Vue.prototype.$TUIKitTypes = TIM.TYPES; // 监听系统级事件
- new Vue({
- router,
- store,
- render: (h) => h(App),
- }).$mount("#app");
|