Giter Site home page Giter Site logo

Comments (2)

SunGiantor avatar SunGiantor commented on August 22, 2024 1

可以的,可以在后端调用设置房间属性接口https://docs.agora.io/cn/agora-class/agora_class_restful_api?platform=Web#%E6%9B%B4%E6%96%B0%E8%AF%BE%E5%A0%82%E5%B1%9E%E6%80%A7
将用户列表(包括头像和昵称等)信息传入教室中。
然后在web端在IM模块通过获取列表中自己的头像信息,修改默认头像
将 set(
uiStore,
'props.imAvatarUrl',
'https://download-sdk.oss-cn-beijing.aliyuncs.com/downloads/IMDemo/avatar/Image1.png',
);

修改为
var currrentUser = uiStore.classroomStore.roomStore.flexProps.find( (itm: any) => itm.userId == widgetStore.classroomConfig.sessionInfo)
var userAvatarUrl = currrentUser.avatarUrl

set(
uiStore,
'props.imAvatarUrl',
userAvatarUrl,
);

此时发送消息后就会将自己的头像信息同步给远端用户,就可以展示自己的头像了。

from cloudclass-desktop.

wbkearly avatar wbkearly commented on August 22, 2024

感谢回复!

from cloudclass-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.