Ver código fonte

聊天界面

dgf 8 anos atrás
pai
commit
8da88f3a68

+ 3 - 0
talkview/src/js/controller/messageController.js

@@ -21,9 +21,12 @@ angular.module('appMessage').controller('MessageController', ['$scope', '$filter
         $scope.voicePlay = function($event) {
             var audio = $($event.target.parentElement.nextElementSibling)[0];
             var unread = $($event.target.nextElementSibling);
+            var audioAll = document.getElementById('voice');
             console.log($($event.target));
             if (audio !== null) {
                 if (audio.paused) {
+                    //audio.load();
+                    audioAll.load();
                     unread.removeClass("app-voice-unread");
                     $($event.target).removeClass("app-voice-pause");
                     $($event.target).addClass("app-voice-play");

+ 1 - 1
talkview/src/less/app.main.less

@@ -476,7 +476,7 @@ body {
   opacity: 1;
 }
 .app-voice-you {
-    height: 25px;
+    height: 50px;
     width: 75px;
     .app-voice-time {
         float: left;

+ 2 - 2
talkview/src/templates/messages.html

@@ -233,7 +233,7 @@
                                 <div class="app-voice-state app-voice-pause" ng-click="voicePlay($event)" style="background-image: url(../img/yuyin.png);"></div>
                                 <div class="app-voice-unread"></div>
                             </div>
-                            <audio >
+                            <audio id="voice" controls>
                                 <source src="local://E:/LxtalkUIView/dist/img/111.mp3" >
                                 <source src="local://E:/LxtalkUIView/dist/img/111.ogg" >
                                 您的浏览器不支持 audio 元素。
@@ -259,7 +259,7 @@
                                 <div class="app-voice-state app-voice-pause" ng-click="voicePlay($event)" style="background-image: url(../img/yuyin-self.png);"></div>
                                 <div class="app-voice-unread"></div>
                             </div>
-                            <audio >
+                            <audio id="voice" controls>
                                 <source src="local://E:/LxtalkUIView/dist/img/111.mp3" >
                                 <source src="local://E:/LxtalkUIView/dist/img/111.ogg" >
                                 您的浏览器不支持 audio 元素。